Because of the support to runtimes in parallel, version 4.0 of the . NET platform changed the way the framework binds to old mixed mode assemblies (Mixed mode).
These assemblies are, for example, those that are compiled from C++ CLI. (Directx assemblies are also available in mixed mode.) If you see this message, you will know that this is the cause of your problem:
Mixed mode Assembly has been compiled relative to the version
'v2.0.50727' of the runtime and cannot be loaded at the time of
execution 4.0 without additional configuration information.
If you want to return to the binding mode used in . NET 2.0, add the following flag to your app.config file:
<startup useLegacyV2RuntimeActivationPolicy="true">
</startup>
Source:
F# Scripting, . NET 4.0 and Mixed-mode assemblies, Jomo Fisher
Get a look at this link.http://www.davidmoore.info/blog/2010/12/17/running-net-2-runtime-applications-under-the-net-4-runtime/
– MeuChapeu
I had already looked at this link, but it didn’t solve. vlw
– Ivo Villa
Solution: https://msdn.microsoft.com/en-us/windows/desktop/bg162891.aspx
– Ivo Villa