Because of parallel runtimes support, version 4.0 of the .NET platform has changed the way the framework binds to mixed-mode old 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:
The mixed-mode assembly was compiled against the
'runtime v2.0.50727' and can not be loaded in runtime
running 4.0 with no 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