Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Number displayed after a new Web Site project's name

I deleted an old ASP.NET Web Application project called nPower.Ignition.WebResponsive from my solution in Visual Studio, but when I added a new Web Site project in the same spot, I saw (1) appended at the end of my desired name. I tried to delete and recreate a few more times, and now I'm to the point where it looks like this in my solution explorer, with (3) appended on the end of my desired name!

enter image description here

So... I pretty much know what caused this, but not how to fix it.

Is Visual Studio remembering that I used to have a project with that name in my solution, even though I've deleted it, and trying to avoid a conflict by giving it a different name? Is there a way I can get rid of the number appended at the end? I understand it probably won't make much of a difference from a programming standpoint if I leave the name as is, but it looks quite sloppy!

like image 497
Ectropy Avatar asked Jul 31 '14 20:07

Ectropy


People also ask

Where are project properties in VS code?

You access project properties by right-clicking the project node in Solution Explorer and choosing Properties, or by typing properties into the search box on the menu bar and choosing Properties Window from the results.

How do I change the project type in Visual Studio?

In the Solutions Explorer window, right-click the exe project and then select Properties in the popup. Then change the Output type from Windows Application to Class Library.

Where is project settings in Visual Studio?

In Visual Studio, you can access project settings by right-clciking the projects node in Solution Explorer, and choosing "Properties" from the context menu (not to be confused with the "Properties" folder that is in some Elements projects).


1 Answers

This occurs because each time you create a Web Site project using IIS Express, VS adds a new entry to IIS Express' applicationhost.config (C:\Users\YourName\Documents\IISExpress\config\applicationhost.config). Each website needs to be unique, so VS will append and increment the number following the name.

To get rid of this, you need to clear out the conflicting entries in the applicationhost.config file.

In more recent versions of Visual Studio, the applicationhost.config file is located in the .vs\config folder under the solution file.

like image 112
Jimmy Avatar answered Oct 03 '22 04:10

Jimmy