首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >为什么在更新到VS更新3之后,NuGet无法在Visual 2012中加载?

为什么在更新到VS更新3之后,NuGet无法在Visual 2012中加载?
EN

Stack Overflow用户
提问于 2013-07-10 18:02:03
回答 6查看 15.1K关注 0票数 13

在更新到VisualStudio2012Update 3(我以前运行了更新2)之后,NuGet无法加载。我的意思是,在加载了一个使用NuGet并用于工作的解决方案之后,Package就不再出现了。*它不会出现在“工具”菜单下。* NuGet (管理NuGet包)在右键单击解决方案后不会出现在菜单中*在项目右击后NuGet (Manage )不会出现在菜单中

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

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

代码语言:javascript
运行
复制
 /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。

当我使用工具/选项时..。对话框并选择Package右侧窗格显示文本:“加载此属性页时发生错误”。在展开Package并选择General或Package源时,将显示相同的文本。

我已经卸载和重新安装了NuGet无数次,我已经安装了从下载的VSIX和直接在扩展和更新对话框中,结果总是一样的。

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

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

代码语言:javascript
运行
复制
<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>

这部分看上去没问题。但是,还有以下警告和错误:

代码语言:javascript
运行
复制
<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、Version=2.6.40627.9000、Culture=neutral、PublicKeyToken=b03f5f7f11d50a3a‘或其依赖项之一。系统找不到指定的文件.

问题是为什么系统找不到文件或者缺少什么依赖项。MSDN技术支持帮助我,但后来决定这是他们不支持的问题,我应该在这里张贴这个问题。

EN

回答 6

Stack Overflow用户

发布于 2013-09-06 05:48:23

看看此链接 to coops007有一个很好的解决NuGet问题的方法。

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

  1. 从网上下载Nuget 6软件包,而不是通过VS2012中的VS扩展库下载。
  2. 确保VS2012完全关闭。
  3. 运行VSIX安装程序两次(同时运行!)第一个将安装,第二个表示已经安装。这是第二个安装程序,实际上是完成工作。

Note,如果只运行一次安装程序,则VS2012中的错误仍然存在。此外,如果您再次运行安装程序,错误仍然存在。您必须同时运行安装程序两次。

票数 28
EN

Stack Overflow用户

发布于 2014-02-13 14:13:36

这个场景适用于我:

  • 下载NuGet包管理器 v6文件
  • 像压缩存档一样解压
  • 将内容复制到安装NuGet扩展的文件夹(在我的系统上是"c:\Program (x86)\Microsoft 11.0\Common7\IDE\Extensions\oabo2crw.lk3")
票数 4
EN

Stack Overflow用户

发布于 2015-01-09 16:58:23

以防有帮助。。。

我也有"NuGet.Tools“的NuGet.Tools错误。我正在Windows8.1上运行2012,并且(在尝试了许多其他推荐的解决方案之后),以下步骤对我有效:

  1. 以管理员身份运行VS2012 (此时,我所做的一切都是以administrator...just的身份进行的)
  2. 从“NuGet Package Manager”菜单中的“Extensions and Updates...”对话框中卸载Tools
  3. 重新启动Visual
  4. 从他们的网站下载"Nuget.Tools.vsix“文件。当选择Extensions and Updates...包时,您可以通过单击“NuGet”对话框的“包信息”部分中的“更多信息”链接找到这一点。
  5. 已关闭的2012。
  6. 以管理员身份运行powershell。
  7. 导航到我保存.VSIX文件的地方。
  8. 从powershell运行.VSIX文件。

因此,基本上,我只是使用powershell手动安装了这个包。之后,我重新启动了Visual,没有出现更多的错误。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17577736

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档