更新到 Visual Studio 2012 Update 3(我之前运行的是 Update 2)后,NuGet 无法加载。我的意思是,在我加载了一个使用 NuGet 并可以正常工作的解决方案后,包管理器不再显示。* 它不会显示在工具菜单下。* 右键单击解决方案后,菜单中不显示 NuGet(管理 NuGet 包) * 右键单击项目后,菜单中不显示 NuGet(管理 NuGet 包)
扩展和更新对话框(工具/扩展和更新...)确实显示 NuGet 包管理器已安装,当我单击它时,它显示它可以被卸载。
此外,当我在卸载并重新安装 NuGet 包管理器(从我在 CodePlex nuget 站点上获得的下载)后检查安装日志时,它显示它已成功安装:
/10/2013 11:39:05 AM - Beginning to install extension to Microsoft Visual Studio Professional 2012...
7/10/2013 11:39:05 AM - Install to Microsoft Visual Studio Professional 2012 completed successfully. The extension has been installed to C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 11.0\\COMMON7\IDE\EXTENSIONS\VYALGTD2.XZS\
我检查了一下,这个文件夹确实存在并且包含 NuGet dll。
当我转到 TOOLS/Options... 对话框并选择 Package Manager 时,右侧窗格显示文本:“加载此属性页时发生错误”。展开 Package Manager 并选择 General 或 Package Sources 时,会显示相同的文本。
我已经多次卸载并重新安装了 NuGet,我已经从下载的 VSIX 和直接在“扩展和更新”对话框中安装,结果始终相同。
我安装了旧版本的 NuGet,得到了相同的结果。我已经卸载并重新安装了 Visual Studio,并且在版本 1、更新 2 或更新 3 中得到了相同的结果。
尝试加载 NuGet 时,Activity.log.xml 文件显示以下问题:
<entry>
<record>211</record>
<time>2013/07/10 17:39:44.295</time>
<type>Information</type>
<source>Microsoft.VisualStudio.CommonIDE.ExtensibilityHosting.VsShellComponentModelHost</source>
<description>Successfully loaded component assembly from cache</description>
<path>C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 11.0\COMMON7\IDE\EXTENSIONS\VYALGTD2.XZS\NuGet.VisualStudio.dll</path>
</entry>
<entry>
<record>212</record>
<time>2013/07/10 17:39:44.295</time>
<type>Information</type>
<source>Microsoft.VisualStudio.CommonIDE.ExtensibilityHosting.VsShellComponentModelHost</source>
<description>Successfully loaded component assembly from cache</description>
<path>C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 11.0\COMMON7\IDE\EXTENSIONS\VYALGTD2.XZS\NuGet.Console.dll</path>
</entry>
<entry>
<record>213</record>
<time>2013/07/10 17:39:44.295</time>
<type>Information</type>
<source>Microsoft.VisualStudio.CommonIDE.ExtensibilityHosting.VsShellComponentModelHost</source>
<description>Successfully loaded component assembly from cache</description>
<path>C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 11.0\COMMON7\IDE\EXTENSIONS\VYALGTD2.XZS\NuGetConsole.Host.PowerShellProvider.dll</path>
</entry>
<entry>
<record>214</record>
<time>2013/07/10 17:39:44.298</time>
<type>Information</type>
<source>VisualStudio</source>
<description>End package load [Visual Studio Component Model Host Package]</description>
<guid>{49D12072-378B-4FFA-A09E-40E0B5D097CC}</guid>
</entry>
<entry>
<record>215</record>
<time>2013/07/10 17:39:44.383</time>
<type>Information</type>
<source>VisualStudio</source>
<description>End package load [Microsoft.VisualStudio.Editor.Implementation.EditorPackage]</description>
<guid>{E269B994-EF71-4CE0-8BCD-581C217372E8}</guid>
</entry>
这部分看起来不错。但随后出现以下警告和错误:
<entry>
<record>234</record>
<time>2013/07/10 17:39:57.070</time>
<type>Warning</type>
<source>VisualStudio</source>
<description>Performance warning: String load failed. Pkg:{00000000-0000-0000-0000-000000000000} LANG:0409 ID:1003
</description>
</entry>
<entry>
<record>235</record>
<time>2013/07/10 17:39:57.072</time>
<type>Warning</type>
<source>VisualStudio</source>
<description>Performance warning: String load failed. Pkg:{00000000-0000-0000-0000-000000000000} LANG:0409 ID:1004
</description>
</entry>
<entry>
<record>236</record>
<time>2013/07/10 17:39:57.073</time>
<type>Warning</type>
<source>VisualStudio</source>
<description>Performance warning: String load failed. Pkg:{5FB7364D-2E8C-44A4-95EB-2A382E30FEC7} (EditorExtensionsPackage) LANG:0409 ID:101
</description>
</entry>
<entry>
<record>237</record>
<time>2013/07/10 17:39:57.073</time>
<type>Warning</type>
<source>VisualStudio</source>
<description>Performance warning: String load failed. Pkg:{5FB7364D-2E8C-44A4-95EB-2A382E30FEC7} (EditorExtensionsPackage) LANG:0409 ID:106
</description>
</entry>
<entry>
<record>238</record>
<time>2013/07/10 17:39:57.073</time>
<type>Warning</type>
<source>VisualStudio</source>
<description>Performance warning: String load failed. Pkg:{5FB7364D-2E8C-44A4-95EB-2A382E30FEC7} (EditorExtensionsPackage) LANG:0409 ID:102
</description>
</entry>
<entry>
<record>239</record>
<time>2013/07/10 17:39:57.073</time>
<type>Warning</type>
<source>VisualStudio</source>
<description>Performance warning: String load failed. Pkg:{5FB7364D-2E8C-44A4-95EB-2A382E30FEC7} (EditorExtensionsPackage) LANG:0409 ID:101
</description>
</entry>
<entry>
<record>240</record>
<time>2013/07/10 17:39:57.074</time>
<type>Warning</type>
<source>VisualStudio</source>
<description>Performance warning: String load failed. Pkg:{5FB7364D-2E8C-44A4-95EB-2A382E30FEC7} (EditorExtensionsPackage) LANG:0409 ID:107
</description>
</entry>
<entry>
<record>241</record>
<time>2013/07/10 17:39:57.074</time>
<type>Warning</type>
<source>VisualStudio</source>
<description>Performance warning: String load failed. Pkg:{5FB7364D-2E8C-44A4-95EB-2A382E30FEC7} (EditorExtensionsPackage) LANG:0409 ID:103
</description>
</entry>
<entry>
<record>242</record>
<time>2013/07/10 17:39:57.074</time>
<type>Warning</type>
<source>VisualStudio</source>
<description>Performance warning: String load failed. Pkg:{5FB7364D-2E8C-44A4-95EB-2A382E30FEC7} (EditorExtensionsPackage) LANG:0409 ID:105
</description>
</entry>
<entry>
<record>243</record>
<time>2013/07/10 17:39:57.074</time>
<type>Warning</type>
<source>VisualStudio</source>
<description>Performance warning: String load failed. Pkg:{5FB7364D-2E8C-44A4-95EB-2A382E30FEC7} (EditorExtensionsPackage) LANG:0409 ID:104
</description>
</entry>
<entry>
<record>244</record>
<time>2013/07/10 17:40:00.908</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Entering function CVsPackageInfo::HrInstantiatePackage</description>
<guid>{5FCC8577-4FEB-4D04-AD72-D6C629B083CC}</guid>
</entry>
<entry>
<record>245</record>
<time>2013/07/10 17:40:00.908</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [NuGet.Tools.NuGetPackage, NuGet.Tools, Version=2.6.40627.9000, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]</description>
<guid>{5FCC8577-4FEB-4D04-AD72-D6C629B083CC}</guid>
</entry>
<entry>
<record>246</record>
<time>2013/07/10 17:40:00.915</time>
<type>Error</type>
<source>VisualStudio</source>
<description>CreateInstance failed for package [NuGet.Tools.NuGetPackage, NuGet.Tools, Version=2.6.40627.9000, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]</description>
<guid>{5FCC8577-4FEB-4D04-AD72-D6C629B083CC}</guid>
<hr>80070002</hr>
<errorinfo>Could not load file or assembly 'NuGet.Tools, Version=2.6.40627.9000, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.</errorinfo>
</entry>
<entry>
<record>247</record>
<time>2013/07/10 17:40:00.915</time>
<type>Error</type>
<source>VisualStudio</source>
<description>End package load [NuGet.Tools.NuGetPackage, NuGet.Tools, Version=2.6.40627.9000, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]</description>
<guid>{5FCC8577-4FEB-4D04-AD72-D6C629B083CC}</guid>
<hr>80004005 - E_FAIL</hr>
<errorinfo>Could not load file or assembly 'NuGet.Tools, Version=2.6.40627.9000, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.</errorinfo>
</entry>
<entry>
<record>248</record>
<time>2013/07/10 17:40:00.915</time>
<type>Warning</type>
<source>VisualStudio</source>
<description>Package failed to load; error message suppressed by skip flag</description>
<guid>{5FCC8577-4FEB-4D04-AD72-D6C629B083CC}</guid>
</entry>
<entry>
主要线索在记录 246 中—— 无法加载文件或程序集“NuGet.Tools,版本=2.6.40627.9000,文化=中性,PublicKeyToken=b03f5f7f11d50a3a”或其依赖项之一。该系统找不到指定的文件。
问题是为什么系统找不到文件或缺少什么依赖项。MSDN 技术支持正在帮助我,但后来决定这是他们不支持的问题,我应该在此处发布该问题。