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!
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!
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.
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.
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).
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With