Background: We have old-style ASP.NET WSP - web site project. This is the one that does not produces single DLL and uses dll.refresh
files for reference mappings.
Problem: Using VS2017, we're able to work with it with no issues but only as long as DLLs we reference are not x64. See pictures below
As result, in code files we get suggestions to "add reference". This type of "project" is regulated in large by web.config
. But I couldn't find any switch that would help. I also turned on "Use 64-bit IIS" in tools but no help.
What do we know
- This is a design time issue
- If I use
Aspnet_compiler
against this WSP with x64 dependencies, it compiles fine - On Dev box I can use x86 dependencies and work in this way (and have been for 18 years). But on build box we need x64 DLLs.
++ This one demands explanation. We used to only precompile (aspnet_compiler) for release. But now, we also want to build and validate before precompilation. Precompilation without validation has couple drawbacks - it doesn't validate
ashx
handlers and it doesn't pull dependencies - we have to know which DLLs to supply and then it will compile.
It seem to me that somehow I need to tell Visual Studio to use 64-bit tools, but I don't know how. For projects with project files there is <AspNetToolPath>
tag. But how to replicate this here? When I build with MSBUILD it gives me ASPNETCOMPILER : error ASPCONFIG: Could not load file or assembly... incorrect format
. So, there is something with wrong toolset and in VS background compilation is not working. And same with MSBuild - it picks wrong toolset, or, it picks whatever toolset is should but I need to give command which to use.