I have a Web Forms website. This website links to 4 class library projects. 3 of these class libraries reference a third-party assembly. I get the following compiler error for each of the three class library projects.
ASPNETCOMPILER: ASPCONFIG error: Could not load file or assembly 'myAssembly' or one of its dependencies. An attempt was made to download programs with the wrong format. [Project. metaproj]
I tried all possible combinations of AnyCPU / x86 / x64 in class library projects. I cannot change this in a website project. I have a x86 and x64 version of a third-party DLL. I tried both.
"ClassLibrary.csproj" (default target) (4) → (ResolveAssemblyReferences target) → C: \ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ Microsoft.Common.targets (1561.5): warning MSB3270: a mismatch occurred between the processor architecture is the project built by "MSIL" and the processor architecture of the link is "ThirdPartyDll, Version = xxx, Culture = neutral, processorArchitectu re = x86", "x86". This mismatch can lead to runtime failures. in the target processor architecture of your project through Configurati on the manager to coordinate the processor architectures between your project and the links, or depend on the links to the processor architecture th when the target processor architecture of your project matches. [ClassLibrary.cspro J]
The following is an example solution configuration. Note. I cannot change from "AnyCPU" here, only from within each project of the library of individual classes.

All .NET 4
Converting a website into a web application is not an option.
Thanks,
Sam leach
source share