Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2013 using old Website name

So in Visual Studio 2012 I renamed a website in a solution from "oldname" to "newname". I have opened this solution in Visual Studio 2013 and somehow it is using "oldname" for the website instead of "newname". This is not is NOT an ASP.NET website application just an ASP.NET website.

I have searched the content of all files in the solution directory and cannot find "oldname". I am 100% positive that that "oldname" is not in the .sln file and the website does not have a project file of course.

like image 436
Brian Ogden Avatar asked Nov 27 '22 21:11

Brian Ogden


2 Answers

Check %userprofile%\documents\iisexpress\config\applicationhost.config file. It suspect it should have the old name. Rename the website in the file, close your solution and open it back again.

like image 195
Adarsh Shah Avatar answered Mar 05 '23 01:03

Adarsh Shah


This is how I managed to do it with my solution in Visual Studio 2015:

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

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

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

like image 24
Hauns TM Avatar answered Mar 05 '23 02:03

Hauns TM