Reputation: 461
Just started with ASP.NET MVC with Visual Studio 2019. I cloned a project from GitHub, and it runs fine. However, when I try to add a class I get the error message saying "The system cannot find the path specified".
I have looked this up but can't find any similar questions.
I am trying to run a default ASP.NET MVC project, there have been no changes to the code. I only cloned the project, so I'm guessing there had to be some issues during the fetch maybe?
Upvotes: 7
Views: 7245
Reputation: 41
I faced a similar issue when trying to create a new class file inside of a folder in Solution Explorer. Turns out the folder didn't exist in the windows explorer. Navigate to the location to see if the folder exists, if not, create one and re-try. Worked for me.
Upvotes: 4
Reputation: 575
Open the project using windows explorer and validate that the folder that you trying to add the new class exists, if not just create it and then clean visual studio solution and rebuild it, besides refreshing the solution explorer.
If the previous solution didn't work, then remove .vs folder (after closing the visual studio) and re-open the solution
Upvotes: 9