Visual Studio 2017 cannot create or open .shproj (shared Project) files

丶灬走出姿态 提交于 2019-12-11 14:48:49

问题


I have recently upgraded to Visual Studio 2017 version 15.6.3. After doing so (and fixing a bunch of other issues), I can no longer open or create .shproj files.

My existing projects say (load failed) next to each shared project file, and I have the following in my output window whenever I try reloading the project:

C:\File\Path\Project.Shared.shproj : error : Expected 1 export(s) with contract name "Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.ProjectFactory+ProjectLoadHelper" but found 0 after applying applicable constraints.

Similarly if I try to create a new shared project, I get the same message in a popup:

Microsoft Visual Studio Expected 1 export(s) with contract name Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.ProjectFactory+ProjectLoadHelper" but found 0 after applying applicable constraints.

Why is Visual Studio not allowing me to load or create .shproj files and how can I solve it?


回答1:


I deleted the entire folder at UserName\AppData\Local\Microsoft\VisualStudio (idea from https://developercommunity.visualstudio.com/content/problem/190581/1560-preview-3-breaks-azure-functions-projects.html) and now my .sproj files load.



来源:https://stackoverflow.com/questions/49416820/visual-studio-2017-cannot-create-or-open-shproj-shared-project-files

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