For a solution containing two websites:
1) ASP.NET based on .NET 4.61
2) .NET Core RC2
After running iisexpress for (2), MSVS updates applicationhost.config to contain a few extra lines that seem incompatible with (1). This is not noticed until iisexpress shuts down and then tries to start (1).
Incompatible strings:
<section name="aspNetCore" overrideModeDefault="Allow" /> <add name="AspNetCoreModule" image="C:\Program Files (x86)\Microsoft Web Tools\AspNetCoreModule\aspnetcore.dll" /> <add name="AspNetCoreModule" />
When starting up (1), a dialog box appears informing you that “IISExpress failed to start” and the event is recorded:
The DLL module 'C: \ Program Files (x86) \ Microsoft Web Tools \ AspNetCoreModule \ aspnetcore.dll could not be loaded due to a configuration problem. The current configuration supports loading images created for the AMD64 processor architecture. The data field contains the error number. To learn more about this issue, including how to resolve this processor architecture mismatch error, see http://go.microsoft.com/fwlink/?LinkId=29349 .
Possible solutions?
A) Removed additional lines before starting (1), how to achieve this automatically?
B) Use a different applicationhost.config for each website, is there an environment variable for this?
C) Directly fix the problem indicated in the event log. Somehow it works when you run the .NET Core RC2 site, so it's weird.
D) Use separate decision files that are in different directories. This is undesirable, as it is a rather complicated solution.
source share