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
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.
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>
Open Properties of project. Then select the Resources. Delete all resource images and insert them again. now compile it. Your project is working now.. :)