'Visual Studio Explorers and Designer Package' 包未正确加载
The 'Visual Studio Explorers and Designer Package' package did not load correctly
每次我在 Visual Studio 2015 年打开解决方案时,我都会收到以下消息:
这是来自 ActivityLog.xml 的最后条目:
<entry>
<record>827</record>
<time>2015/12/23 11:26:13.919</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [Visual Studio Explorers and Designers Package][Object reference not set to an instance of an object.]:{ at Microsoft.VSDesigner.VSDMenus.Initialize(IServiceProvider serviceProvider)
 at Microsoft.VSDesigner.VSDesignerPackage.VSDesignerPackage.Initialize()
 at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)}</description>
<guid>{8D8529D3-625D-4496-8354-3DAD630ECC1B}</guid>
<hr>80004003 - E_POINTER</hr>
<errorinfo>Object reference not set to an instance of an object.</errorinfo></entry>
我遵循了类似 中的建议,但没有成功。
很遗憾,通过扩展和更新重新安装 NuGet 无法解决问题。
删除文件夹Microsoft.VisualStudio.Default.Cache
中的文件C:\Users\<username>\AppData\Local\Microsoft\VisualStudio.0\ComponentModelCache
如果@batressc 解决方案不起作用,您还必须删除解决方案文件夹中的 .VS
文件夹。
所以:
- 关闭所有VSWindows
- 删除文件夹
C:\Users\<username>\AppData\Local\Microsoft\VisualStudio.0\ComponentModelCache
- 删除文件夹
[Solution Folder]\.vs
我的诀窍是删除 "Microsoft .NET Core 1.0.1 VS 2015 Tooling Preview 2"
运行 下面的命令提示帮助我解决了 VS 2017 Community 上的问题。不过我从未尝试过其他 VS 版本。让我知道它是否适用于其他版本:
"C:\Program Files (x86)\Microsoft Visual Studio17\Community\Common7\IDE\devenv.exe" /resetskippkgs
这对 VS 2017 有帮助:
https://developercommunity.visualstudio.com/content/problem/160124/failed-to-load-package-monoandroiddesignerpackage.html
1) 开始VS
2) 文件->新建->项目->Xamarin 应用程序(iOS 或 Android)
3) 现在点击工具箱
4) 关闭VS
删除此文件夹对我有用。
C:\Users[用户名]\AppData\Roaming\Microsoft\VisualStudio.0_14b774ca
我仅在 .netcore 3.1 上遇到此错误:
'windows forms remote designer hosting package' 包没有正确加载
借助此处所有答案解决。
删除目录的全部内容:
- 项目中的.vs-
- c:\Users\User\AppData\Local\Microsoft\VisualStudio.0_1cac4d16\
每次我在 Visual Studio 2015 年打开解决方案时,我都会收到以下消息:
这是来自 ActivityLog.xml 的最后条目:
<entry>
<record>827</record>
<time>2015/12/23 11:26:13.919</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [Visual Studio Explorers and Designers Package][Object reference not set to an instance of an object.]:{ at Microsoft.VSDesigner.VSDMenus.Initialize(IServiceProvider serviceProvider)
 at Microsoft.VSDesigner.VSDesignerPackage.VSDesignerPackage.Initialize()
 at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)}</description>
<guid>{8D8529D3-625D-4496-8354-3DAD630ECC1B}</guid>
<hr>80004003 - E_POINTER</hr>
<errorinfo>Object reference not set to an instance of an object.</errorinfo></entry>
我遵循了类似
很遗憾,通过扩展和更新重新安装 NuGet 无法解决问题。
删除文件夹Microsoft.VisualStudio.Default.Cache
中的文件C:\Users\<username>\AppData\Local\Microsoft\VisualStudio.0\ComponentModelCache
如果@batressc 解决方案不起作用,您还必须删除解决方案文件夹中的 .VS
文件夹。
所以:
- 关闭所有VSWindows
- 删除文件夹
C:\Users\<username>\AppData\Local\Microsoft\VisualStudio.0\ComponentModelCache
- 删除文件夹
[Solution Folder]\.vs
我的诀窍是删除 "Microsoft .NET Core 1.0.1 VS 2015 Tooling Preview 2"
运行 下面的命令提示帮助我解决了 VS 2017 Community 上的问题。不过我从未尝试过其他 VS 版本。让我知道它是否适用于其他版本:
"C:\Program Files (x86)\Microsoft Visual Studio17\Community\Common7\IDE\devenv.exe" /resetskippkgs
这对 VS 2017 有帮助: https://developercommunity.visualstudio.com/content/problem/160124/failed-to-load-package-monoandroiddesignerpackage.html
1) 开始VS
2) 文件->新建->项目->Xamarin 应用程序(iOS 或 Android)
3) 现在点击工具箱
4) 关闭VS
删除此文件夹对我有用。
C:\Users[用户名]\AppData\Roaming\Microsoft\VisualStudio.0_14b774ca
我仅在 .netcore 3.1 上遇到此错误:
'windows forms remote designer hosting package' 包没有正确加载
借助此处所有答案解决。
删除目录的全部内容:
- 项目中的.vs-
- c:\Users\User\AppData\Local\Microsoft\VisualStudio.0_1cac4d16\