Downgrade an application from .net 4.0 to 3.5

前端 未结 3 697
旧时难觅i
旧时难觅i 2021-01-02 07:29

I have been developing an application in VS2010 and compiling it for the .NET 4.0 as the target framework. After integrating a library into my application, I get the followi

相关标签:
3条回答
  • 2021-01-02 07:57

    You should be able to make this work by configuration settings in app.Config.

    Just add the useLegacyV2RuntimeActivationPolicy="true" flag to your appConfig in the startup section. This causes the .NET 4 runtime to handle older mixed-mode assemblies.

    0 讨论(0)
  • 2021-01-02 07:57

    Open your .resx file with the XML editor instead of the resources editor, and search for System.Windows.Forms, Version=4.0.0.0. There should be 2 instances of this string. Replace 4.0.0.0 with 2.0.0.0 and save the file. Your resources should work correctly now.

    Note that you can also go back to .NET 4 and try to add the following to your App.config to allow older assemblies to run on the new runtime:

    <configuration>
      <startup useLegacyV2RuntimeActivationPolicy="true">
        <supportedRuntime version="v4.0"/>
      </startup>
    </configuration>
    
    0 讨论(0)
  • 2021-01-02 07:57

    Open Properties of project. Then select the Resources. Delete all resource images and insert them again. now compile it. Your project is working now.. :)

    0 讨论(0)
提交回复
热议问题