An error occurs while loading my ASP.NET application after it is configured for IIS

Mohammad Mirmostafa picture Mohammad Mirmostafa · Apr 21, 2016 · Viewed 24.2k times · Source

I changed my ASP.NET web application to use Local IIS, instead of IIS Express. Now after re-opening the solution, the following error occurs while loading the application:

error : Project 'Atlas2' could not be opened because the Visual C# 2015 compiler could not be created. 'Atlas2' is already part of the workspace.

error : Project 'Atlas2' could not be opened because the Visual C# 2015 compiler could not be created. An item with the same key has already been added.

Would someone please help me how I can reload the project? I'm using Visual Studio Team Services (was TFS Online), if it helps.

Answer

Mohammad Mirmostafa picture Mohammad Mirmostafa · Apr 23, 2016

I solved my problem. I unloaded the project and edited .csproj file. I did the following changes:

  • <UseIISExpress>false</UseIISExpress> to true
  • Remove <UseIIS>True</UseIIS>
  • Remove <IISUrl>http://localhost/MyWebApp</IISUrl>

Then I reloaded the project. It worked. Actually it rolled back to use IIS Express.