Visual Studio 2017 无法创建或打开 .shproj(共享项目)文件 [英] Visual Studio 2017 cannot create or open .shproj (shared Project) files

查看:26
本文介绍了Visual Studio 2017 无法创建或打开 .shproj(共享项目)文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近升级到 Visual Studio 2017 版本 15.6.3.这样做后(并修复了一系列其他问题),我无法再打开或创建 .shproj 文件.

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 : 错误: 预期 1 次导出,合同名称为Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.ProjectFactory+ProjectLoadHelper",但在应用适用后发现 0约束.

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:

微软视觉工作室预期 1 个导出,合同名称为 Microsoft.VisualStudio.ProjectSystem.VS.Implementation.Package.ProjectFactory+ProjectLoadHelper",但在应用适用的约束后发现 0.

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.

为什么 Visual Studio 不允许我加载或创建 .shproj 文件,我该如何解决?

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

推荐答案

我删除了 UserName\AppData\Local\Microsoft\VisualStudio 中的整个文件夹(想法来自 https://developercommunity.visualstudio.com/content/problem/190581/1560-preview-3-breaks-azure-functions-projects.html),现在我的 .sproj 文件加载.

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.

这篇关于Visual Studio 2017 无法创建或打开 .shproj(共享项目)文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆