我已经在我的一台装有 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/