I am trying to add a link to the .Net 2.0 DLL in a WPF application designed for the .NET Framework.
I added <startup useLegacyV2RuntimeActivationPolicy="true"> to the app.config file. The WPF application works fine, but when trying to access the DLL.Net 2.0 receives a BadImageFormatException error message at runtime.
"An attempt was made to download a program with the wrong format"
This works with the new WPF test project, but does not work in my application. My application uses Entity Framework and MEF. Can these technologies cause a problem?
Any ideas?
Edit: Allowed
According to Alois's comment below, I had a main application oriented to βAny processorβ, and the DLL was aimed at the 32-bit version.
<startup useLegacyV2RuntimeActivationPolicy="true"> not required
Mike
source share