PC Review


Reply
Thread Tools Rating: Thread Rating: 4 votes, 4.00 average.

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

 
 
shapper
Guest
Posts: n/a
 
      27th Apr 2010
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
 
Reply With Quote
 
 
 
 
Jeroen Mostert
Guest
Posts: n/a
 
      27th Apr 2010
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.
 
Reply With Quote
 
 
 
 
Elden Armbrust
Guest
Posts: n/a
 
      20th May 2010


"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
 
Reply With Quote
 
Jeroen Mostert
Guest
Posts: n/a
 
      21st May 2010
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.
 
Reply With Quote
 
Elden Armbrust
Guest
Posts: n/a
 
      21st May 2010
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.
> .
>

 
Reply With Quote
 
Willem van Rumpt
Guest
Posts: n/a
 
      21st May 2010
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
 
Reply With Quote
 
Jeroen Mostert
Guest
Posts: n/a
 
      21st May 2010
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.just****inggoogleit.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.
 
Reply With Quote
 
New Member
Join Date: Mar 2006
Posts: 2
 
      30th Mar 2012
Quote:
Originally Posted by Jeroen Mostert View Post
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.
Thanks for being so helpful. I think I'm going to ask you whenever I have a question about anything because you are so wise and insightful.
 
Reply With Quote
 
venu.manchikanti@gmail.com
Guest
Posts: n/a
 
      28th Dec 2013
Hi,

I found a way around this after 3-4 hours of googling. I have added the following in App.Config Configuration.

<startup seLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/>
</startup>

If above lines doesn't solve your problem then--> In the Project References Right Click on System.Data.SQLite--> Select Properties--> Check the Run-time Version --> If it is v2.0.50727 then we know the problem.
The Problem is:- you are having 2.0 Version of SQLite DLL.
Solution is:- You can delete the System.Data.SQLite from the Project references and then download the latest version of DLL's from the following link and add the reference of the latest version DLL reference then it will work.

http://system.data.sqlite.org/index....downloads.wiki
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where to get stand alone Dot Net Framework version 1.1, version 2.0,version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? pg Windows XP General 11 9th Feb 2008 02:55 AM
Where to get stand alone Dot Net Framework version 1.1, version 2.0,version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? pg Microsoft Dot NET 11 9th Feb 2008 02:55 AM
Re: Where to get stand alone Dot Net Framework version 1.1, version 2.0, version 3.0, version 3.5, version 2.0 SP1, version 3.0 SP1 ? V Green Windows XP Help 0 5th Feb 2008 03:45 AM
is there any way to get to a unique build verion of an assembly at runtime? e.g. a version that is unique to the time that the assembly was built? Daniel Microsoft Dot NET Framework 1 14th Dec 2004 05:10 PM
is there any way to get to a unique build verion of an assembly at runtime? e.g. a version that is unique to the time that the assembly was built? Daniel Microsoft C# .NET 1 10th Dec 2004 04:06 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:21 PM.