"Web Site Already Exists" Popup When Creating a ASP.NET Empty Web Site Project in Visual Studio 2022 - Stack O

admin2025-04-17  9

I created a ASP.NET Empty Web Site project earlier in Visual Studio 2022 but I had to delete the folder due to some reason. Now when I try creating a project with the same name at the same path with no folder in it (no hidden folders also) it shows this popup. I don't want to change the name.

This is my first time using Visual Studio for web project and I looked everywhere but couldn't find anything related.

I created a ASP.NET Empty Web Site project earlier in Visual Studio 2022 but I had to delete the folder due to some reason. Now when I try creating a project with the same name at the same path with no folder in it (no hidden folders also) it shows this popup. I don't want to change the name.

This is my first time using Visual Studio for web project and I looked everywhere but couldn't find anything related.

Share edited Jan 31 at 9:03 VLAZ 29.2k9 gold badges63 silver badges84 bronze badges asked Jan 31 at 2:06 sujoybytesujoybyte 6366 silver badges22 bronze badges
Add a comment  | 

4 Answers 4

Reset to default 0

I would open the older site folder location.

I think you not deleting the correct folder.

When I look at the folder created, my path name on my computer is this:

C:\Users\Kalla\source\repos\MyPortFolio\MyPortFolio

So, two folders with the same name are created.

So, if I delete the folder in repos called MyPortFolio?

This one:

C:\Users\Kalla\source\repos\MyPortFolio

Then I have no issue when I create the project again.

So far?

From what I can tell, you not deleting the correct folder.

I recommend that you could try the following steps to check if it works for you.

First, please delete Website and MyPortfolio folder.

Second, please delete the Visual Studio Cache in the following folder:

%LocalAppData%\Microsoft\VisualStudio\<version>\ComponentModelCache 

Third, please restart windows system .

Finally, please create the solution folder first then add the website project.

Please open Powershell and type in: cd D:\Project\Website Then type in: ls If it shows MyPortofolio then the project is still there and you should delete it.

If it's not there please delete the whole folder path including Project and re-create the folders.

So I solved solved the issue by disabling the Place solution and project in the same directory. Although I always place my solution and project in the same folder for every Visual Studio project. I am assuming it's a bug from Visual Studio or Windows itself.

转载请注明原文地址:http://anycun.com/QandA/1744883195a88972.html