Visual Studio 2013 using the old site name

So, in Visual Studio 2012, I renamed the website in the solution from "oldname" to "newname". I opened this solution in Visual Studio 2013 and somehow uses "oldname" for the site instead of "newname". This is not an ASP.NET web application, but simply an ASP.NET website.

I searched the contents of all files in the solution directory and cannot find "oldname". I am 100% sure that this "oldname" is not in the .sln file, and there is no project file on the website, of course.

+4
source share
3 answers

Check the %userprofile%\documents\iisexpress\config\applicationhost.configfile. He suspects that he must have an old name. Rename the website to a file, close your solution, and open it again.

+19
source

Here's how I managed to do this with my solution in Visual Studio 2015:

Close your solution> go to .sln-folder> .vs (hidden)> config enter image description here

Look for error prone names (possible multiples) in the sites section. I deleted every <site></site>one where there were naming conflicts. In my case, I had this, for example:enter image description here

After deleting sections <site></site>from the current applicationhost.config file, I was able to re-add website projects with my new and correct name!

+3
source

, applicationhost.config , .

If you manage to simply remove the site from your solution and then add the existing one from the local IIS instance, you will see a renamed version there.

You can confirm your location before deleting the site.

0
source

All Articles