Given a solution containing two websites:
1) ASP.NET based on .NET 4.61
2) .NET Core RC2
After launching iisexpress for (2), MSVS updates the applicationhost.config to contain a few extra lines that appear to be incompatible with (1). This isn't noticed until iisexpress is first shutdown and then attempting to launch (1).
The incompatible lines are:
<section name="aspNetCore" overrideModeDefault="Allow" />
<add name="AspNetCoreModule" image="C:\Program Files (x86)\Microsoft Web Tools\AspNetCoreModule\aspnetcore.dll" />
<add name="AspNetCoreModule" />
When launching (1), a dialog appears stating "IISExpress failed to launch" and an event is written:
The Module DLL 'C:\Program Files (x86)\Microsoft Web Tools\AspNetCoreModule\aspnetcore.dll' could not be loaded due to a configuration problem. The current configuration only supports loading images built for a AMD64 processor architecture. The data field contains the error number. To learn more about this issue, including how to troubleshooting this kind of processor architecture mismatch error, see http://go.microsoft.com/fwlink/?LinkId=29349.
Possible solutions?
A) Removed the extra lines before launching (1), how to achieve that automatically?
B) Use a different applicationhost.config for each website, is there an environment variable to set this?
C) Directly fix the problem reported in the event log. Somehow it works when launches the .NET Core RC2 site so that's strange.
D) Use separate solution files that happen to be in different directories. This is not desirable as it is a fairly complex solution.
<remove>
tag to remove it in web.config level or use a location tag. – Achilles