简体   繁体   中英

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?

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM