none
.NET 3.5 built Mixed mode assembly unable to load in .NET 4 (even after using app config) without .NET 3.5 RRS feed

  • Question

  • I am trying to run a .NET 3.5 built mixed mode assembly in .NET 4. I was able to do that by adding an app config file with the following content:

    <configuration>
    <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0"/>
    </startup>
    </configuration>
    The problem is that I used an XP machine and installed .NET 4 on it (without any other previous versions of .NET). When I tried to run the same thing, it gives me an error saying it is unable to load the assembly in .NET 4.

    Any idea why this is still depending on .NET 3.5?

    Friday, October 1, 2010 5:47 AM

All replies

  •  

    Can other .NET 4.0 applications work on the xp machine? If those applications neither work, you may use this tool to verify whether the .NET 4.0 is installed correctly.

     

    Is the .NET 3.5 assembly an executable or a library? If it is a library, does the assembly referenced by a .NET 4.0 executable?

     

    Generally, <supportedRuntime version="v4.0"/> element is enough for letting a .NET 3.5 application run under .NET 4.0, what if you remove the useLegacyV2RuntimeActivationPolicy element?


    Sincerely,
    Eric
    MSDN Subscriber Support in Forum
    If you have any feedback of our support, please contact msdnmg@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Friday, October 1, 2010 9:55 AM
  • Hi Niranjan,

    May I know the issue status?


    Sincerely,
    Eric
    MSDN Subscriber Support in Forum
    If you have any feedback of our support, please contact msdnmg@microsoft.com.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Tuesday, October 5, 2010 8:08 AM
  • Hey Eric,

    Sorry I couldnt reply sooner. I was held up with something and so couldn't look into this much. And thanks for your reply.

    To answer your questions: My .NET 3.5 assembly is a library and I am trying to reference it from a .NET 4.0 executable.

    I'll post the results of investigation based on your response soon.

    - Niranjan


    - Niranjan
    Tuesday, October 5, 2010 6:28 PM