2 Replies - 417 Views - Last Post: 03 February 2012 - 08:47 AM Rate Topic: -----

Topic Sponsor:

#1 negligible  Icon User is online

  • D.I.C Regular
  • member icon

Reputation: 56
  • View blog
  • Posts: 272
  • Joined: 02-December 10

Mixed mode assembly is built against version 'v2.0.50727'

Posted 03 February 2012 - 07:48 AM

Hi,

I cannot build a project, written by an ex-employee, on my Windows 7 workstation. It works perfectly fine on the old XP machine he used and I have an exact copy.

Error	1	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.	C:\Working\Scan\v2.5.9.99\ConfigurationTool\ConfigurationTool\SGEN	ConfigurationTool



I have already searched for a solution to this error message but I have found that the solutions provided do not resolve the problem :(

This is how my config file started off, useLegacyV2RuntimeActivationPolicy is already present.

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


I have tried every suggested combination as well as different profile for full and client versions, as outlined in this thread with no results.

http://stackoverflow...-2-0-mixed-mode

Has anyone got a fix or any ideas on what could be causing the difference between the copies on different machines?

Is This A Good Question/Topic? 0
  • +

Replies To: Mixed mode assembly is built against version 'v2.0.50727'

#2 modi123_1  Icon User is online

  • Suiter #2
  • member icon


Reputation: 3558
  • View blog
  • Posts: 14,987
  • Joined: 12-June 08

Re: Mixed mode assembly is built against version 'v2.0.50727'

Posted 03 February 2012 - 07:57 AM

Is this a web app or a desktop app?

Also why not tell it you support v2.0 framework but require 4.0?


<supportedRuntime version="v2.0"/>
<requiredRuntime version="v4.0.20506"/>

Was This Post Helpful? 0
  • +
  • -

#3 negligible  Icon User is online

  • D.I.C Regular
  • member icon

Reputation: 56
  • View blog
  • Posts: 272
  • Joined: 02-December 10

Re: Mixed mode assembly is built against version 'v2.0.50727'

Posted 03 February 2012 - 08:47 AM

This is a Form application.

I've already run through many different combinations in the config file. As outlined in this article:
http://msdn.microsof...y/ee517334.aspx

However none of them have worked when it has come to building the project.


.NET Framework version

XML

4 Client
<framework targetVersion="4.0" profile="Client" supportedRuntime="4.0.30319" />
4 Full
<framework targetVersion="4.0" profile="Full" supportedRuntime="4.0.30319" />
3.5 Client
<framework targetVersion="3.5" profile="Client" supportedRuntime="2.0.50727" />
3.5 Full
<framework targetVersion="3.5" profile="Full" supportedRuntime="2.0.50727" />
3.0
<framework targetVersion="3.0" supportedRuntime="2.0.50727" />

4 Client
<supportedRuntime version="v4.0.30319" sku=".NETFramework,Version=v4.0,Profile=Client" />
4 Full
<supportedRuntime version="v4.0.30319" sku=".NETFramework,Version=v4.0" />
3.5 Full
<supportedRuntime version="v2.0.50727"/>
3.5 Client
<supportedRuntime version="v2.0.50727" sku="Client"/>

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1