I'm not sure why, but Visual Studio is not showing all the projects in my solution. I need them to show so I can set as default project under solution explorer. I'm not seeing a fix for this issue in a general internet search. The closest I see is VS not showing files folders, but this is different than my issue. Hopefully there is an easy way to fix it, without adding things again piecemeal. My co-workers can see their complete set of projects in solution explorer so it must be a corruption in my workspace.
-
3close the solution and open it again. Or try "Add existing project"... – Legends Jan 20 '17 at 21:00
-
Closing and opening the solution didn't fix it. I shouldn't have to add existing project, since it's supposed to be in there already. My old co-worker used to have a file that I could remove, but I don't have notes on it now. When I entered Visual Studio again, the file would be re-created by Visual Studio. – Michele Jan 23 '17 at 12:48
-
This is a little late to the party but I ran into a _similar problem with VS2019_ and thought I'd leave a note that the issue was in a path created by `git clone`. The source repo had "A name with banks" and the default directory name on the machine was thus "A%20name%20with%20blanks". Apparently VS2019 doesn't like URL escape chars in the folder path. After removing them everything worked fine. – Markus Deibel May 02 '19 at 07:58
-
This happened to me after pulling a change that added a new project to the solution. The project didn't appear at first. Restarting Visual Studio (2017) made the project appear. – Gustaf Liljegren May 24 '19 at 11:42
-
There appears to be some issue related to the use of .slnf files and this issue... Haven't pinned down the exact steps yet though – Hoppe Apr 29 '20 at 13:02
8 Answers
Open your ".sln" project file using Notepad. In this file you can observe listed projects like below
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test.myProject.Data", "test.myProject.Data\test.myProject.csproj", "{6D7F7B84-F3BD-4A19-A069-D144C345B887}"
EndProject
Please add if there any missing projects. If you have old back up or co-workers file, Just copy and paste missing projects to this file. In my case it works !!
- 341
- 3
- 8
-
Or click "Compare with unmodified" on your git/tfs thing. And then revert/copypaste changes. – AgentFire Nov 15 '18 at 11:05
close vs , delete .vs folder then open vs again. it works for me.
- 417
- 5
- 14
-
-
2Right click to you solution in Solution Explorer, then Click Open Folder in File Explorer. You will see .vs folder there! – funbrain9 May 20 '20 at 03:16
I had to copy out changed files in my workspace, fix my permissions/ownership on my directory (it was no owner instead of me), re-do the mapped drive the workspace was on, re-do the shortcut to the Visual Studio project (even though it was supposed to theoretically be the same place I mapped), re-pull the project down, and copy my changes in again. At this point Visual Studio had the missing solutions in it again so I could set startup project and run the debugger. I'm not sure how the ownership/permissions got messed up. I think at one point the other office had a server go down, and maybe my permissions/ownership got mixed up then. I'm not sure why VS wasn't showing the missing projects, but it's fixed after doing the above.
- 3,252
- 11
- 39
- 72
I had the same issue where my colleague saw 1 more project on his computer.
I deleted my .sln file and got the exact same version as he. Problem was still the same.
Solution was: I had an unloaded project. Apparently this is safed in a local user setting file (probably the .suo file). I looked for the unloaded project and loaded it again.
- 589
- 5
- 9
-
Where is the local user settings file/the .suo file you mentioned about ?? – Sanjok Gurung May 14 '21 at 07:30
-
@Sanjok should be next to the solution file - if you did some changes for your own local copy. – kabeleced May 15 '21 at 19:26
- Close the VStudio entire project, go to the main project folder and click on the .sln file to load the entire project agian.
- go to solution explorer see which are having (unload), right click and load project with dependencies
- sometimes check if the project startup has changed, if changed just right click on the related project and set as project startup
- 21
- 4
This .sln file structure breakdown offers a great insight on how projects are able to be found and populated into the project hierarchy. My .sln file had lost all its project persistence blocks and thus I had 0 projects under my solution. I copied the blocks from a a previous git commit and this fixed it. I still don't know why the blocks disappeared or the whole .sln file changed
- 3
- 1
- 3
I had the same issue. After opening the Visual Studio in Administrator mode it started to work.
Search for VS->Right click-> "Run as administrator"
- 1