visual-studio - "ExtensionManagerPackage"没有正确加载

标签 visual-studio winapi ide visual-studio-2017 visual-studio-community

我已经在我的一台装有 Windows 7、SP 1 的机器上下载了 Visual Studio 2017,但有时安装失败。安装 Windows 10 SDK 时出错。根据微软网站的说法,这是一个错误,解决方案是单独下载 Windows 10 SDK 并这样安装。

现在当我这样做时,在第一次运行 VS 时,我得到了下一个错误:

The 'ExtensionManagerPackage' package did not load correctly...Restarting Visual Studio could help resolve this issue.



建议重新启动并没有改变任何东西。

启动时类似这样的错误很少(与软件包相关的错误)。现在我正在重新安装,并将尝试选择不同的工作负载,看看是否每个工作负载都会发生这种情况......

如果重要的话,我已经安装了通用 Windows 平台开发,
.NET 桌面开发和使用 C++ 工作负载的 Windows 桌面开发。

这是我从 ActivityLog.xml 文件中得到的(位于 VisualStudio\15.0_0b1e9ecf\文件夹中:

SetSite failed for package [ExtensionManagerPackage]Source: 'Microsoft.VisualStudio.ExtensionManager.Implementation' Description: Could not load type 'Microsoft.VisualStudio.Shell.IOleMenuCommand' from assembly 'Microsoft.VisualStudio.Shell.Interop.8.0, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. System.TypeLoadException: Could not load type 'Microsoft.VisualStudio.Shell.IOleMenuCommand' from assembly 'Microsoft.VisualStudio.Shell.Interop.8.0, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. at Microsoft.VisualStudio.ExtensionManager.VSPackage.ExtensionManagerPackage.d__27.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[TStateMachine](TStateMachine& stateMachine) at Microsoft.VisualStudio.ExtensionManager.VSPackage.ExtensionManagerPackage.InitializeAsync(CancellationToken cancellationToken, IProgress`1 progress) at Microsoft.VisualStudio.Shell.AsyncPackage.<>c__DisplayClass16_0.<b__1>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.VisualStudio.Services.VsTask.RethrowException(AggregateException e) at Microsoft.VisualStudio.Services.VsTask.InternalGetResult(Boolean ignoreUIThreadCheck) at Microsoft.VisualStudio.Services.VsTask.GetResult()



随着:

End package load [ExtensionManagerPackage]



这也是一个已知的错误吗?有人经历过吗?

最佳答案

我终于能够通过以下方式解决这个问题:
https://developercommunity.visualstudio.com/content/problem/26746/getting-errors-when-starting-vs2017-ide.html

我按照评论中的方法去了”

“对我有用的另一种方法是将 GAC 中的 dll 替换为 VS2017 PublicAssemblies 文件夹中的 dll ......步骤更少,仍然可以完成...... :)”

关于visual-studio - "ExtensionManagerPackage"没有正确加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43419387/

相关文章:

VB.NET - 以编程方式检查 Excel 中是否存在工作表

c# - 将它们放在 WinForm 上时,是否可以让您的用户控件显示这些对齐指南?

java - 如何在 Eclipse 中设置主要 Java 类型?

c++ - 使用 C++ 的 XCode、Visual Studio 和 GitHub

java - 如何使用 Eclipse 在 Java 中的同一监视器上找到所有同步的内容?

.net - 如何制作 Visual Studio 宏以将调试器附加到 w3wp.exe 的所有实例?

c# - 在 C# 中使用 App Config 文件中的值

C# - 如何在多显示器上下文中获得真实的屏幕分辨率?

c# - 在 C# 中禁用屏幕保护程序和电源选项

c++ - winapi - 清除 CBitmap 的区域