在更新为VS Update 3之后,为什么NuGet无法在Visual Studio 2012中加载? [英] Why does NuGet fail to load in Visual Studio 2012 after updating to VS Update 3?

查看:114
本文介绍了在更新为VS Update 3之后,为什么NuGet无法在Visual Studio 2012中加载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新到Visual Studio 2012 Update 3(我以前正在运行Update 2)之后,NuGet无法加载.意思是说,我加载了使用NuGet并可以正常工作的解决方案后,不再显示软件包管理器. *它不会显示在工具"菜单下. *右键单击解决方案后,菜单中未显示NuGet(管理NuGet软件包) *右键单击项目后,菜单中未显示NuGet(管理NuGet软件包)

After updating to Visual Studio 2012 Update 3 (I was previously running Update 2), NuGet fails to load. By that I mean the Package Manager no longer shows up after I have loaded a solution that uses NuGet and used to work. * It does not show up under the Tools Menu. * NuGet (Manage NuGet Packages) does not show up in the menu after right click on the solution * NuGet (Manage NuGet Packages) does not show up in the menu after right click on the project

扩展和更新"对话框(工具/扩展和更新...")确实显示了已安装的NuGet软件包管理器,当我单击它时,它表明可以卸载.

The Extensions and Updates dialog (TOOLS/Extensions and Updates...) does show the NuGet Package Manager as installed and when I click on it it shows that it can be uninstalled.

另外,当我在卸载后检查安装日志,然后重新安装NuGet软件包管理器时(从我在CodePlex nuget站点上获得的下载中),它表明已成功安装:

Also when I checked the installation log after uninstalling and then re-installing the NuGet Package Manager (from the download I got on the CodePlex nuget site) it shows that it was successfully installed:

 /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.

I checked and this folder does in fact exist and contains NuGet dlls.

当我转到工具/选项..."对话框并选择程序包管理器"时,右侧窗格显示文本:加载此属性页面时发生错误".展开程序包管理器"并选择常规"或程序包来源"时,将显示相同的文本.

When I go to the TOOLS/Options... dialog and select Package Manager the right hand pane shows the text: "An error occurred loading this property page". The same text is shown when Package Manager is expanded and either General or Package Sources are selected.

我已经多次卸载并重新安装NuGet,并且已经从下载的VSIX以及直接在扩展和更新"对话框中进行安装,结果始终是相同的.

I have uninstalled and re-installed NuGet numerous times and I have installed both from the downloaded VSIX and directly in the Extensions and Updates dialog and the result is always the same.

我安装了一个较旧的NuGet版本,并且得到了相同的结果.我已经卸载了Visual Studio并重新安装了Visual Studio,并获得与版本1,更新2或更新3相同的结果.

I have installed an older version of NuGet and I get the same results. I have uninstalled Visual Studio and re-installed it and I get the same results with version 1, Update 2, or Update 3.

Activity.log.xml 文件在尝试加载NuGet时显示以下问题:

The Activity.log.xml file shows the following issue when attempting to load NuGet:

<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>

这部分看起来不错.但随后出现以下警告和错误:

This part looks OK. But then there are the following warnings and errors:

<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&#x000D;&#x000A;</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&#x000D;&#x000A;</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&#x000D;&#x000A;</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&#x000D;&#x000A;</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&#x000D;&#x000A;</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&#x000D;&#x000A;</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&#x000D;&#x000A;</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&#x000D;&#x000A;</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&#x000D;&#x000A;</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&#x000D;&#x000A;</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'或其依赖项之一.系统找不到指定的文件.

With the main clue being in record 246 -- 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.

问题是为什么系统找不到文件或缺少什么依赖性. MSDN Tech的支持帮助了我,但后来决定这是他们不支持的问题,我应该在此处发布此问题.

The question is why can't the system find the file or what dependency is missing. MSDN Tech support was helping me, but then decided that this was a problem they would not support and that I should post the issue here.

推荐答案

看看此链接 coops007对于NuGet问题有很好的解决方案.

Take a look at this link to coops007 has a great solution for NuGet problem.

以下是解决该问题的步骤,这些步骤适用于@Catherine:

here are the steps to solve the issue, which worked for @Catherine:

  1. 不通过VS2012中的VS扩展库,从Web下载Nuget vsix软件包.
  2. 确保VS2012已完全关闭.
  3. 运行VSIX安装程序两次(两次都运行!)第一次安装,第二次安装已经安装.这实际上是完成任务的第二个安装程序.

注意,如果仅运行安装程序一次,则VS2012中的错误仍然存​​在.另外,如果您再次重新运行安装程序,则错误仍然存​​在. 您必须同时运行两次安装程序

Note, if you run the installer just once, the errors inside VS2012 remain. Also, if you rerun the installer again, the errors remain. You have to run the installer twice simultaneously

这篇关于在更新为VS Update 3之后,为什么NuGet无法在Visual Studio 2012中加载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆