7

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?

Jim Aho
  • 9,932
  • 15
  • 56
  • 87

2 Answers2

14

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

Steve Greene
  • 12,029
  • 1
  • 33
  • 54
  • I tried all the other solutions, but this fixed it. Thanks – the sandman Feb 08 '17 at 17:57
  • 2
    This should be the accepted answer. Both point to the same answer but this is much more direct. Also, you may want to mention that the vs directory is hidden and in the *Projects* folder. – krowe2 Oct 31 '17 at 20:05
5

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.

Steen Tøttrup
  • 3,755
  • 2
  • 22
  • 36
  • I only have one web site project in the solution. I'm not using IIS Express, but instead IIS7.5 locally. Visual Studio however automatically adds a `UseIISExpress = True` attribute which i'd like to remove. – Jim Aho Jan 07 '15 at 11:15
  • Yes, in that solution, no other web sites in other solutions? And VS will add it to the IIS Express config anyway. Why are you using IIS ? Instead of IIS Express? – Steen Tøttrup Jan 07 '15 at 11:26
  • I only have one solution that I have opened, so I think that part is fine. However, I realized that when I first opened my solution in VS2013, a default port number was added, which was not the same as the one specified in the config file for IIS Express, hence yet another entry had to be made. That's what I suspect so far. – Jim Aho Jan 07 '15 at 11:30