Visual Studio 2015 debugger uses local applicationhost.config instead of Global Configuration

iis-expressvisual-studio-2015

I have a weird situation where even when the following setting is set in the csproj:

<UseGlobalApplicationHostFile>True</UseGlobalApplicationHostFile>

Visual Studio 2015 still creates sites in the local .vs directory (.vs\config\applicationhost.config) and ignores the flag set in the csproj.

I've gotten this working in another solution where it uses the global version in (Documents\IISExpress\config) after adding the GlobalApplicationHostFile key.

But this specific solution (it's quite old compared to the other solution) just doesn't want to work. I've also compared the raw csproj files and am unable to see any differences.

I've also deleted all *.suo files for good measure.

Is there any other setting apart from the use global application host file that needs to be set?

Thanks for your help! 🙂

Best Answer

So I ran a search for UseGlobalApplicationHostFile, turns out this solution had "Store settings in Project" disabled, so there was a .csproj.user file that had the global application host file set to false.

Feeling a bit silly - but everything works as expected now!