Visual Studio not showing all Projects in solution

假如想象 提交于 2019-12-23 07:43:35

问题


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.


回答1:


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 !!




回答2:


close vs , delete .vs folder then open vs again. it works for me.




回答3:


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.




回答4:


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.




回答5:


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"



来源:https://stackoverflow.com/questions/41772243/visual-studio-not-showing-all-projects-in-solution

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!