While upgrading a Windows Form application built on .NET 2.0 to 4.5, I encountered this error “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. at …..”
The MainForm is the only one upgraded to .NET 4.5 to take advantage of the new async features and the other libraries linked to it are kept on .NET 2.0.
It took me a while to figure this out. In your application config file, add the following configuration highlighted below. Make sure that you add this just after the configSections.
<startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> <supportedRuntime version="v2.0.50727"></supportedRuntime> </startup>