This might be something you already know, however I just found out about it and I am writing it down to share it with you and to help myself find it in case I forget about it which will probably happen.

In the past, when working with Visual Studio projects downloaded from the web, or projects that are shared with other developers, every once in a while I ran into the issue of not being able to load the project in Visual Studio because either the path is wrong, or if it is a web project, maybe the project is setup to run on IIS and I didn't have it setup so the project wouldn't load, etc... you get the point.

My way of fixing these problems (up until today) was to close the Visual Studio solution, open the project file using notepad and then make the necessary changes to fix the issue, save it and then reopen the project again. It worked, not a big deal. However, when you have several projects in one solution and many of them are not loading, it is a pain having to close Visual Studio every time this happens, for each project, just to edit the project file with notepad.

Today I found there is an easier way to do this. There is no need to close the project or solution to make changes to the project file. If your project does not load for any of the reasons above, or for any other reason, you don't need to close Visual Studio to open the project file using notepad, yes notepad is great and everything, but if you are already in Visual Studio then I don't know about you but I would like to be able to fix these type of issues without having to close Visual Studio.


This is how your project looks like in Visual Studio when for some reason it doesn't load in Visual Studio:




Right-click on your unavailable project and select Edit [YourProjectName].csproj, Visual Studio will open the project file using the code editor and you'll be able to make any changes you need to it. I wish I knew about this before. See screen shot below for sample of the project file opened with Visual Studio:




After you are done making your changes, just right click on the project file again and select Reload Project. If the changes you made to the file are good and the project file does not have any more issues, you should be able to see your project in Solution Explorer, see screen shot below:




The above is to show you a way to edit the project file without having to close it and open it in notepad to make changes.

If your project loaded correctly but you still need to make changes to the project file for whatever reason, you can "unload" your project intentionally and then edit it following the steps above. To "unload" your Visual Studio project, just right click on it and select Unload Project. After that you should be able to right click on it again and select Edit to start making changes to it.

Good luck.