I got this exception after runing an execuable in command line execution:
"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."
After search this issue on internet, I found one of the way out is to configure App.Config file. That works fine in VS2010 but still generates same error in command mode.
So is there any way to resolve this by using command line as generating newer version of .dll is impossible.
Thanks!
You can also try useLegacyV2RuntimeActivationPolicy="true"
Another solution can be to recompile all mixed(C++/CLI) assemblies you are dependent on for .NET 4.0. It is often not possible if these assemblies are third party.
Make sure you have configured both the App.config and the ProgramName.exe.config file.
For example: