I'm building an app on C# with .NET framework 4.5, but one of the dlls I'm using is built with .NET 2.0, so I'm trying to add mixed mode assembly functionality.
This is the error I receive: 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.
I tried this http://msdn.microsoft.com/en-us/library/bbx34a2h.aspx and now my app.config looks like this:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup>
</configuration>
And when I run the application in visual studio, on release mode, it runs as expected, but when I try to run it in its working environment, it crashes with said error.
I tried this also [ Mixed Mode Error when building in Release Mode ] with no success.
Am I missing something else?
As @Amitd suggested, I copied the [appname].exe.config file to the working directory and now the app is working as expected!