Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime ... Please, how to solve this

Hello,

I am working with VS 2010 / NET 4.0 to create a simple WPF / C#
application.

I am using the following assemblies:

  Microsoft.SqlServer.ConnectionInfo
  Microsoft.SqlServer.Management.Sdk.Sfc
  Microsoft.SqlServer.Smo

The project builds fine but when I run it I get the following error:

  Mixed mode assembly is built against version 'v2.0.50727' of the
runtime and cannot be loaded in the 4.0 runtime without additional
configuration information.

Does anyone knows how to solve this problem?

Is this because my NET is 4.0 and the assemblies are in 2.0?
If that would be the case it wouldn't build ... am I wrong?

Thank You,
Miguel
0
shapper
4/27/2010 12:45:28 AM
dotnet.languages.csharp 1931 articles. 0 followers. Follow

6 Replies
3990 Views

Similar Articles

[PageSpeed] 24

On 2010-04-27 2:45, shapper wrote:
> The project builds fine but when I run it I get the following error:
>
>    Mixed mode assembly is built against version 'v2.0.50727' of the
> runtime and cannot be loaded in the 4.0 runtime without additional
> configuration information.
>
> Does anyone knows how to solve this problem?
>
Read the message again, especially where it talks about additional 
configuration information. Then search the web for this message. Then solve 
your problem.

-- 
J.
0
Jeroen
4/27/2010 4:48:00 AM

"Jeroen Mostert" wrote:

> On 2010-04-27 2:45, shapper wrote:
> > The project builds fine but when I run it I get the following error:
> >
> >    Mixed mode assembly is built against version 'v2.0.50727' of the
> > runtime and cannot be loaded in the 4.0 runtime without additional
> > configuration information.
> >
> > Does anyone knows how to solve this problem?
> >
> Read the message again, especially where it talks about additional 
> configuration information. Then search the web for this message. Then solve 
> your problem.
> 
> -- 
> J.
> .
> 

Why even comment if your "answer" is going to be like that?
You sir, should not "help" anyone until you know what you're doing.

Now, the answer to the question is to create/edit the file <exe name>.config 
and add the following:

  <startup useLegacyV2RuntimeActivationPolicy="true">
            <supportedRuntime version="v4.0" />   
  </startup>

so that the file resembles the following:

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
      <startup useLegacyV2RuntimeActivationPolicy="true">
                <supportedRuntime version="v4.0" />   
      </startup>

      <runtime>
        <generatePublisherEvidence enabled="false" />
      </runtime>
    </configuration>


So if your application's binary is called "app.exe" then the configuration 
file would be named "app.exe.config"

This should fix the problem(s) you're having.

Good luck!
-Elden
0
Utf
5/20/2010 7:35:01 PM
On 2010-05-20 21:35, Elden Armbrust wrote:
>
>
> "Jeroen Mostert" wrote:
>
>> On 2010-04-27 2:45, shapper wrote:
>>> The project builds fine but when I run it I get the following error:
>>>
>>>     Mixed mode assembly is built against version 'v2.0.50727' of the
>>> runtime and cannot be loaded in the 4.0 runtime without additional
>>> configuration information.
>>>
>>> Does anyone knows how to solve this problem?
>>>
>> Read the message again, especially where it talks about additional
>> configuration information. Then search the web for this message. Then solve
>> your problem.
>>
>
> Why even comment if your "answer" is going to be like that?

Something like "give a man a fish and feed him for a day, beat him with a 
cluestick and he'll knows when he should buy a rod instead of begging for food".

> You sir, should not "help" anyone until you know what you're doing.
>
Call it malice if you like, but don't attribute it to ignorance.

-- 
J.
0
Jeroen
5/21/2010 4:57:42 AM
You didn't teach him to fish, you pointed at a fishing pole and said "Go 
figure it out."  The message is NOT answered where it is easily obtainable.  
In fact, the reference I posted was from an ASP.Net related post from 
Microsoft.  Again, before you go spouting nonsense, please educate yourself 
on the subject rather than posting something completely useless.  There are 
enough useless search results on the internet, why would you want to flaunt 
your ignorance of the subject?
The issue is closed, I answered the OP's question.  Stop being bitter, and 
move on with life.
-E


"Jeroen Mostert" wrote:

> On 2010-05-20 21:35, Elden Armbrust wrote:
> >
> >
> > "Jeroen Mostert" wrote:
> >
> >> On 2010-04-27 2:45, shapper wrote:
> >>> The project builds fine but when I run it I get the following error:
> >>>
> >>>     Mixed mode assembly is built against version 'v2.0.50727' of the
> >>> runtime and cannot be loaded in the 4.0 runtime without additional
> >>> configuration information.
> >>>
> >>> Does anyone knows how to solve this problem?
> >>>
> >> Read the message again, especially where it talks about additional
> >> configuration information. Then search the web for this message. Then solve
> >> your problem.
> >>
> >
> > Why even comment if your "answer" is going to be like that?
> 
> Something like "give a man a fish and feed him for a day, beat him with a 
> cluestick and he'll knows when he should buy a rod instead of begging for food".
> 
> > You sir, should not "help" anyone until you know what you're doing.
> >
> Call it malice if you like, but don't attribute it to ignorance.
> 
> -- 
> J.
> .
> 
0
Utf
5/21/2010 5:20:01 PM
On 21-5-2010 19:20, Elden Armbrust wrote:
> You didn't teach him to fish, you pointed at a fishing pole and said "Go
> figure it out."  The message is NOT answered where it is easily obtainable.
> In fact, the reference I posted was from an ASP.Net related post from
> Microsoft.  Again, before you go spouting nonsense, please educate yourself
> on the subject rather than posting something completely useless.  There are
> enough useless search results on the internet, why would you want to flaunt
> your ignorance of the subject?
> The issue is closed, I answered the OP's question.  Stop being bitter, and
> move on with life.
> -E
>

Enter

"Mixed mode assembly is built against version 'v2.0.50727' of the
runtime and cannot be loaded in the 4.0 runtime without additional
configuration information"

(The *exact* message associated with the exception) in google.

The first hit has an answer.

It's not about bitterness, it's not about flaunting, it's about making 
an actual effort before crying help.

-- 
   Willem van Rumpt
0
Willem
5/21/2010 6:32:04 PM
On 2010-05-21 19:20, Elden Armbrust wrote:
[handholding]
> You didn't teach him to fish, you pointed at a fishing pole and said "Go
> figure it out."  The message is NOT answered where it is easily obtainable.

Now you're just being silly. Search engines exist for a reason, and the 
primary use case for them is when you are searching for something very 
specific, like the particular error message the OP posted.

I could have simply replied http://www.justfuckinggoogleit.com, but I 
decided to go the extra mile and use complete sentences and such. In fact, I 
thought it was rather neat in its terseness. I'm sorry you didn't like it. 
On the plus side, it was free.

> In fact, the reference I posted was from an ASP.Net related post from
> Microsoft.  Again, before you go spouting nonsense, please educate yourself
> on the subject rather than posting something completely useless.

I did, of course, search for the phrase myself first like the OP might have 
done, and got hits aplenty on the first page. The second one in fact had the 
solution spelled out. That's just about all the due diligence required, I think.

> There are enough useless search results on the internet

There are also enough useful search results. If you feel it's a useful 
expenditure of time to play "Search the Web" on behalf of other people, good 
for you. I like "Encourage People to Search the Web Themselves" more.

> The issue is closed, I answered the OP's question.  Stop being bitter,
> and move on with life.

I'm not bitter at all, just slightly bemused. You're coming off as terribly 
naive. In fact, if you're trolling, good game.

-- 
J.
0
Jeroen
5/21/2010 7:13:39 PM
Reply:

Similar Artilces:

MS CRM 1.2 or 3.0 for Help Desk Ticketing solution
Does anyone use this for a Ticketing program? I know we have the customer service module but have never used it. Is there any documentation on how to set it up as a help desk solution. Thanks Todd Yes , U can surely do this by making a case and the case number can be considered a s Ticket number. You will have to dive deep into the whole process to map it to CRM Rgds SAM "Todd" wrote: > Does anyone use this for a Ticketing program? I know we have the customer > service module but have never used it. Is there any documentation on how to > set it up as a help desk ...

Tracking Cost of Contract Labour on a project, for 3/4 mth contrac
Hello, I am trying to track Project Costs for a client 'after the fact' so to speak. The project has ended, and the client wishes to determine what their actual Costs for their Staff were. Over the course of the project which lasted from 2006 to 2008, the client hired some specialists for specific periods of time to work on various tasks. So there are specific dates where these Staff members would be present as Resources, and others where they would not. Sometimes this happens in the middle of a Task, and some of these tasks can be lengthy. i.e. if Mark is assig...

Session mix-up issue
We ran into a strange issue 2 days back in our client's production environment. A remote user, logs in and finds out that the data available in the web page are from a different user. The client environement is having ..net 3.5 running on Windows 2003 server connected to an Oracle 10g DB. The web server is on NLB and in a DMZ. The sessions are maintained In proc. We analysed the IIS logs and the network logs for that duration and were not able to conclude if this was a security issue or a genuine application related issue. Request your inputs in solving this issue. Ben...

Can not install Internet Explorer on this version of windows
On win xp pro 64-bit. I upgraded to Internet explorer 8 now when I attempt to get updates I get "We need to open a 32-bit version of Internet Explorer", but it fails.... I have attempted to download/install a new copy of IE 8 (32-bit) but get an installation error "Internet Explorer 8 is not supported on this Operating System". I also get the same error when attempting to install IE 7. You must download Windows Internet Explorer 8 for Windows Server 2003 SP2 64-bit Edition or Windows XP Professional 64-bit Edition. This includes both the 64-bit version and ...

Upgrade Excel 2003 to 2007 = loads of #div/0
There is a strange behaviour in my Worksheet since the upgrade from Excel 2003 to Excel 2007. As soon as I "touch" some cells in the sheet, I get loads of #div/0 errors in some cells. Holding F9 (forcing calculations) until all cells have been calculated, solves the problem. When the problem occurs, the first offending cell has a simple subtraction, (three cells, one of them has a fixed 0 value), no divisions. Calculation option is set to Automatic. Can someone explain what's happening? This is not how Excel 2007 behaves. I would seem you have a corrupt w...

Problem with web browser version of discussion board?
Has anyone else been having problems posting messages here using the web browser version of the board? For the last week or so, I've been successful only about 10% of the time. If I click on 'New' or 'Reply', nothing opens up. I've had to use the newsreader version to get things posted. Hi Bud I have had the saem issue but I found a work around (Poasting this with the web Browser). When you see a post you want to reply to first log out of the of your MSN account. then click on reply or new and you will log back in. I then get a web 503 error but if I hit the...

follow up #4
Hi, i´ve got a problem with outlook 2k3. The follow Up function has changed. In the past we use the follow up to remind us on this mail. but now when we set a follow up, the receiver of the mail gets the reminder. Did anyone now about this? Kind regards Thorsten Thorsten, Meeting reminders are forwarded to invitees but follow-up Flags on meetings are not. I did some test on emails, forwarding and replying that had follow-up reminders set-up on them and they were not forwarded. Did I miss something in your explanation below? -- Regards, Francine Otterson President, San Diego...

More Outlook bugs... Rules are mixing up accounts!
*sigh* WHY do the rules in Outlook 2003 keep changing the accounts they are to apply to. ie. "When message arrives through MYACCOUNT@HERE.COM move it to the MYACCOUNT folder." ....changes to... "When message arrives through ANOTHERACCOUNT@HERE.COM move it to MYACCOUNT folder." - These rules were manually entered by me, not imported from OE6. - This is a fresh installation of Win XP Pro SP1 - Only action in OE6 was to import the old email account settings and contents through the Transfer Settings Wizard. The Outlook 2003 was installed and account info imported. If I fix...

.MIX files
I have several .MIX files (Microsoft Photo Draw) that were sent to me. Are there any other Microsoft programs that can read these files ?? I tried to even insert them into MS Word (XP version) but I have received errors everytime I try. Windows XP will preview in a window but I cannot import them into any application ! ...

Cases with no Customer
Hi The requirements for a CRM 4.0 implementation is to be able to create Cases without linking it to a Customer (Contact or Account). From the customisation section in CRM the mandatory Customer field cannot be set to optional or removed from the form. It was proposed that a dummy account is created called 'non-linked', which is used in this situation, but this will have too much of an impact on existing workflow and reports. So my questions is: Is there anyway to design the system so a Case can be created which is not linked to a Customer. And we are happy to consider unsupported so...

Compatibility Mode settings in Advanced Word Options
I set the 'Compatibility options for:' to All New Documents and the 'Lay out this document as if created in:' to Microsoft office Word 2007. I close and relaunch MS Word, and it comes up in Compaitbility Mode and the Advanced Word Options are back to the default settings. What am I doing wrong? Have you been into Word > Options > Save tab and set the 'Save files in this format' option to Word Document (*.dotx)? That's Alt+F, I, S and the very first option. -- Terry Farrell - MSWord MVP "OU81259" <OU81259@discussions.micros...

Average Help, v. 2.0
Thanks again for the help on my previous question. Now, using the same beginning format, I'd like to know how to figure out what the average for the remaining values needs to be to reach 5. ex. Starting with 7 different values from A1 thru A7, what would the values of A8 thru A10 have to be to reach an overall average of 5? Hi Matthew! answer: assuming your values are in A1:A10 =(5*(count(A1:A7)+3)-sum(A1:A7))/3 explaination: The first Problem is, that you need a specific sum to get an specific average: count of all values x 5 = searched sum (10*5=50) you have 7 values: 7 x 5 = ...

Help with setting up spreadsheet and charts please
Hi, I would be extremely grateful for some help with my spreadsheet. I have the following data which I need to use to produce charts for a hospital report fairly urgently. The rows are the names of patients. This could be up to 200 for each month, but this varies from month to month. I will have each month on a different worksheet. Column F - Ward Column G - Hospital Column K - I have a number 1 in the row if the patient meets the criteria I need to produce a chart(s) to show and compare the following: How many patients from each ward met the criteria (as indicated by 1 in column K) a...

how to set a assembly's properties without the use of a GUI
I want to set the Description of my .exe file (it is a .NET assembly). You know that description that is seen in Windows Task Manager process tab. Almost every running process has got one. They can be a whole sentence explaining what the process is about. I need a way of setting this description of my .exe without any GUI. I need it to be set from a command line tool or something alike. Is there a tool like that? Maybe something built into Windows? On May 21, 3:31=A0am, Marcus <marcussilf...@gmail.com> wrote: > I want to set the Description of my .exe file (it is a .NET ...

Outlook 2003/Exchange 2000 Cached Mode
Running the above combination. Any idea how often the GAL gets updated on the cached Outlook client? Any way to force an update or change the update interval? Thank you. Mark P <Mark.Puchalski@n0spamHonigman.com> wrote: > Any idea how often the GAL gets updated on the cached Outlook client? > Any way to force an update or change the update interval? Mine seems to get updated every time a send/receive occurs. You can always click Tools>Send/Receive>Download Address Book. -- Brian Tillman ...

Publisher Can Not Open Files From A Different Version
Publisher Can Not Open Files From A Different Version: Is there anyway to get around this? Hi merle (anonymous@discussions.microsoft.com), in the Microsoft� newsgroups you posted: || Publisher Can Not Open Files From A Different Version: Is || there anyway to get around this? Yes. -- Brian Kvalheim Microsoft Office Publisher MVP Official Publisher MVP Site: http://www.kvalheim.org This posting is provided "AS IS" with no warranties, and confers no rights. You'll need the version that created the file, or newer version. -- Don --------------- If you can read this, tha...

msmoney 5.0
Hi, I did read earlier postings and do realise you're all gonna dislike this question ;-) About 6 years ago I bought a PC .. it was pre-installed with msmoney 5.0 A few weeks ago I bought a new PC ... I managed to relocate all needed programs and files ... except msmoney 5.0 !!!!! I already found out .. it's not possible to relocate this program ... but because my husband is dyslectic, and capable to work with this prog. I'm having a urge to retain ( and being capable to proceed) msmoney 5.0 Is there anyone who can tell me how to get it ?? With lots of excuses Yas ;-) ...

eraser function in word drawing mode
How do I edit a picture in word (eg: to erase part of the picture)? Is there a eraser function? if so how do I use it?? Hi, Click on the picture and the Picture toolbar should appear. You can turn the toolbar on manually using View > Toolbars > Picture. On the bottom row of the toolbar you'll find selection tools. Use an appropriate selection tool to select an area then use Edit > Cut to remove the selected part. -Jim Quoting from "lawengin" <skho@iinet.net.au>, in article 659b9c2c-f361-4f64-be3c-1e1fb2be6ce3@e32g2000prn.googlegroups.com, on [DATE: > How...

RMS Store Operations V2.0.0110 integration with QuickBooks Premier
Hi, I am trying to setup RMS V2 to work with QuickBooks Premier: Retail Edition 2007. When attempting to import data in RMS from QB I'm getting two pop-ups: Pop-up window #1: "Could not retrieve the company from QB. Error Details: Blank response received from QB" Pop-up window #2 (shows up after I click OK on window #1): "Connection successful - You've connected to QuickBooks and retrieved the company info" The QBImport.log file also says "Blank response received from QB" and nothing gets imported. Thank you for taking the time to read this post. An...

Deleted Items Folder #4
My Deleted Items Folder currently says Deleted Items (41). However when I view it, the message "There are no items to show in this view." appears. I can empty the Deleted Items folder but I cannot retrieve anything from it. jnanderson <anonymous@discussions.microsoft.com> wrote: > My Deleted Items Folder currently says Deleted Items > (41). However when I view it, the message "There are no > items to show in this view." appears. Asd what View do you have selected? -- Brian Tillman >-----Original Message----- >jnanderson <anonymous@disc...

Can I upgrade my old Office:Mac 2001 version to Office 2008?
Version: Older version Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Can I upgrade from Office 2001 for Mac to the current version? If so, how do I overpass the installation check? I got the original media -complete with plastic box- in my posesion but I don't think I will be able to install this under Snow Leopard. Any ideas? Yes, Office 2001 qualifies for the upgrade to any edition of Office 2008 *other than* the Home & Student Edition � there is no upgrade path to it. The prior version need not be installed. When prompted to locate the prior version just slip ...

Mixed Icons
I created an application with Visual Studio 2005 under Vista and changed the only icon that the wizard created. When the app runs, the correct icon appears in the task bar and also if I click properties. However, the default icons appear on the quick lanch toolbar and in Windows Explorer. I read through about a years worth of messages on icons, but didn't see anything exactly like my problem. Thanks for any help, Curt You will want to make sure that the default icon is the first one in the EXE and that it has both a large and small icon (and 48x48 if you are specifying for XP or Vist...

Great Plains 9.0, Citrix and Windows 2000
Is anyone aware of any issues with running Great Plains 9.0 on a Citrix server with Windows 2000? ...

Cached mode will not work
I upgrade my Windows XP box from Outlook 2002 to Outlook 2003. It starts up fine, but if I try to put it in "Cached Mode" Outlook will not start. It give the generic message of "Cannot start Microsoft Office Outlook. Unable to open the Outlook window. The set of folders could not be opened. The server is not available. Contact your administrator in this condition persists." I installed Outlook 2003 as a fresh install on my laptop and cached mode works great. Any suggestions? Never mind I found the problem. The offline file name was not a valid file. I set it ...

NDR 4.4.6?
I get the following error when attempting to send to a particular DL. A configuration error in the e-mail system caused the message to bounce between two servers or to be forwarded between two recipients. Contact your administrator. <SERVER #4.4.6> How do I check the possibility of looping? Do the users in the DL have forwarding turned on within their mail properties in AD? "pscottlee" <pscottlee@discussions.microsoft.com> wrote in message news:196F18E2-895E-4AB9-A40E-8D2A6F2E0378@microsoft.com... >I get the following error when attempting to send to a particu...