C# 如何修复 Microsoft Visual Studio 错误:“包未正确加载”?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17574089/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How can I fix the Microsoft Visual Studio error: "package did not load correctly"?
提问by Dua Ali
I installed Visual Studio 2012 and DevExpress13.1. As Visual Studio started, it generated an error shown by this attached image,
我安装了 Visual Studio 2012 和DevExpress13.1。当 Visual Studio 启动时,它生成了此附加图像显示的错误,
The 'Microsoft.VisualStudio.Editor.Implementation.EditorPackage' package did not load correctly.
The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file 'C:\Users\must\AppData\Roaming\Microsoft\VisualStudio\11.0\ActivityLog.xml'.
Continue to show this error message?
“Microsoft.VisualStudio.Editor.Implementation.EditorPackage”包未正确加载。
问题可能是由配置更改或安装另一个扩展引起的。您可以通过检查文件“C:\Users\must\AppData\Roaming\Microsoft\VisualStudio\11.0\ActivityLog.xml”来获取更多信息。
继续显示此错误消息?
This error also appears in Visual Studio 2017.
此错误也出现在 Visual Studio 2017 中。
回答by Reza Ebrahimi
Close Visual Studio.
Backup and delete the following path:
C:\Users\{your_username}\AppData\Roaming\Microsoft\VisualStudio\11.0Restart Visual Studio as
Admin. Otherwise, theRoamingfolder can't be repaired by Visual Studio.
关闭 Visual Studio。
备份并删除以下路径:
C:\Users\{your_username}\AppData\Roaming\Microsoft\VisualStudio\11.0将 Visual Studio 重新启动为
Admin. 否则,RoamingVisual Studio 无法修复该文件夹。
回答by Griffo
I had the same problem and deleting the app data directory for Visual Studio 11.0 worked for me.
我遇到了同样的问题,删除 Visual Studio 11.0 的应用程序数据目录对我有用。
回答by alan
I also experienced this issue after installing Telerik Reporting. I was not able to launch any solution in Visual Studio 2013, nor could I close Visual Studio 2013.
安装 Telerik Reporting 后,我也遇到了这个问题。我无法在 Visual Studio 2013 中启动任何解决方案,也无法关闭 Visual Studio 2013。
After uninstalling the reporting package and deleting Local / Roaming AppData for Visual Studio 2012, the problem was fixed.
卸载上报包并删除Visual Studio 2012的Local/Roaming AppData后,问题得到解决。
回答by jbarrameda
Try devenv /setupon the Visual Studio Command Prompt with administrative rights.
尝试devenv /setup使用具有管理权限的 Visual Studio 命令提示符。
I had the same problem with Visual Studio 2013 Ultimate. I tried the solution by Reza posted here, but it didn't work.
我在 Visual Studio 2013 Ultimate 中遇到了同样的问题。我尝试了 Reza 在此处发布的解决方案,但没有奏效。
Eventually I couldn't close Visual Studio. It was showing a similar dialog when I tried to close, and it wasn't closing. I tried this: Error message "No exports were found that match the constraint contract name". Neither.
最终我无法关闭 Visual Studio。当我尝试关闭时,它显示了一个类似的对话框,但它并没有关闭。我试过这个: 错误消息“没有找到与约束合同名称匹配的导出”。两者都不。
I noticed a message in the Team Explorer window saying "Page 'somenumber' cannot be found". I tried that way, and I found this answer: Page '312e8a59-2712-48a1-863e-0ef4e67961fc' not found using Visual Studio 2012. So I run devenv /setupon the Visual Studio Command Prompt with administrative rights.
我注意到团队资源管理器窗口中有一条消息说“找不到页面‘ somenumber’”。我试过了,我找到了这个答案:Page '312e8a59-2712-48a1-863e-0ef4e67961fc' not found using Visual Studio 2012。所以我devenv /setup在具有管理权限的 Visual Studio 命令提示符下运行。
It did the job, and everything is fine now.
它完成了工作,现在一切都很好。
回答by user_v
I started to see this on a fresh Windows and Visual Studio 2013 Ultimate with Update 2 installation (although others have also reported it on Updates 3 and 4, as well as the Professional version).
我开始在安装了更新 2 的全新 Windows 和 Visual Studio 2013 Ultimate 上看到这一点(尽管其他人也在更新 3 和 4 以及专业版中报告了这一点)。
To resolve the problem, close all Visual Studio instances, then delete all files in the following folder:
要解决此问题,请关闭所有 Visual Studio 实例,然后删除以下文件夹中的所有文件:
Visual Studio 2013
视觉工作室 2013
%localappdata%\Microsoft\VisualStudio.0\ComponentModelCache
It worked fine for me. Thanks to this article.
它对我来说很好。感谢这篇文章。
Visual Studio 2015
视觉工作室 2015
%localappdata%\Microsoft\VisualStudio.0\ComponentModelCache
Visual Studio 2017
视觉工作室 2017
%localappdata%\Microsoft\VisualStudio.0_xxxx\ComponentModelCache
回答by Daniel
I had a similar problem, and I went to Control Panel→ Programsand repaired the Visual Studio installation. It worked for me.
我遇到了类似的问题,我转到控制面板→程序并修复了 Visual Studio 安装。它对我有用。
回答by georger
I had Visual Studio 2013 Professional, and I got the same error. I couldn't remove it until I repaired the Visual Studio installation. It took a while, but now it works fine.
我有 Visual Studio 2013 Professional,但遇到了同样的错误。在修复 Visual Studio 安装之前,我无法删除它。花了一段时间,但现在它工作正常。
回答by danludwig
I also had this issue with Visual Studio 2013 update 4. After running the update 4 installer again and choosing Repair, then restarting the machine, the issue went away.
我在 Visual Studio 2013 更新 4 中也遇到了这个问题。再次运行更新 4 安装程序并选择修复,然后重新启动机器后,问题就消失了。
回答by user3617831
You need to find file devenv.exe.configin C:\Users\{user_name}\AppData\Local\Microsoft\VisualStudio\14.0\and update it. (Or C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\, depending on the location of your devenv.exefile.)
你需要找到的文件devenv.exe.config中C:\Users\{user_name}\AppData\Local\Microsoft\VisualStudio\14.0\并进行更新。(或者C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\,取决于devenv.exe文件的位置。)
For this particular case, you should find rows that setup redirects for System.Collections.Immutableand change newVersion from 1.1.36.0 to 1.1.37.0.
对于这种特殊情况,您应该找到设置重定向System.Collections.Immutable并将 newVersion 从 1.1.36.0 更改为 1.1.37.0 的行。
The original article is How to restore Visual Studio 2015 after the Update 1 (dependency dance).
回答by Jan Zahradník
Based on this Connect feedbackI fixed it by closing all opened documents and restarting Visual Studio. I use Visual Studio 2015.
基于此 Connect 反馈,我通过关闭所有打开的文档并重新启动 Visual Studio 来修复它。我使用 Visual Studio 2015。


