I have a "main" assembly with all the logic, and it uses a third-party component written in version 2.0. When I try to start a WebApi (4.0) (4.5) project that provides basic functions, I get the following error:
Failed to load file or assembly "Core" or one of its dependencies. An attempt was made to download a program with the wrong format.
I created a test console application and changed the startup tag in app.config to use an outdated runtime, it works.
<startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> </startup>
What is the corresponding change in the web.config file?
source share