Search code examples
c#visual-studioasp.net-core

Visual Studio Project doesn't load after changing folder name


I have a Visual Studio C# solution which consists of some projects. I needed to change the name of one of them and after the namespaces and classes refactoring I had to also change the folder name. After I did that, the project stopped loading inside of the solution. How can I make it load again?


Solution

  • You need to edit your csproj/sln file in a text editor and fix the folder name there as well. VS can have issues when you change the project file name.

    Just make sure the path matches anywhere you see a path and it should fix it.

    Also when a project is unloaded, you can double click on it to open the .csproj file! Then just try to reload when you think you have the values changed correctly.