CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2009
    Posts
    3

    Using assemblies compiled against version 2.0.50727 with v4.0

    Hi,

    My Visual C++ 2010 project uses an assembly (dll) which is compiled against v2.0.50729 of CLR. When I target the project for DotNet Framework 4.0, I get the following error message:

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

    I understand that the runtime policy for DotNet Framework is causing this error. I added app.config file to the VC++ project and edited the startup tag like this:

    <startup useLegacyV2RuntimeActivationPolicy="true">

    but this doen't solve the problem. I guess that the VC++ project is not picking up the app.config file.





    Is there anything wrong that I am doing? Any known issues with VC 2010. The same thing works fine for VC# 2010.

  2. #2
    Join Date
    Sep 2009
    Posts
    3

    Re: Using assemblies compiled against version 2.0.50727 with v4.0

    I am able to solve the above problem by renaming app.config file to EXENAME.exe.config and placing it in the Debug / Release directory. For example if the application name is app.exe the config file name should be app.exe.config.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured