Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio adds a number to the project name in solution explorer

I have a solution file with a bunch of projects inside it. One of the projects is a Web Site Project. I was going to upgrade from VS2012 to VS2013, and simply opened the .sln file in VS2013.

It does work, but for some reason VS renames the project so that it is displayed in the solution explorer as "NormalNameForProject(1)" with the (1) being the strange part added. How come this?

I can look inside the actual .sln file and see that it indeed has the (1) added, but where does it come from and why is it added?

like image 787
Jim Aho Avatar asked Jan 07 '15 10:01

Jim Aho


2 Answers

I had this when I added a project, removed it and added it again with the same name. I resolved it by editing the IIS config file located here for VS 2015:

$(solutionDir).vs\config\applicationhost.config

like image 194
Steve Greene Avatar answered Sep 22 '22 13:09

Steve Greene


You probably have other (web site) project with the same name. VS2013 uses IIS Express for hosting the sites locally, and they have to have unique names in the IIS Express config file. If you have several web projects with the same name, they are renamed to match the name in the config file for IIS Express.

That's my best guess.

like image 38
Steen Tøttrup Avatar answered Sep 20 '22 13:09

Steen Tøttrup