在2012年VS中创建MVC4项目时出现NuGet错误

时间:2022-05-13 10:41:17

I tried to create a MVC4 empty project in VisualStudio 2012 Ultimate, but I got this error:

我试图在VisualStudio 2012 Ultimate中创建一个MVC4空项目,但是我犯了一个错误:

"Error: this template attempted to load component assembly 'NuGet.VisualStudio.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.".

错误:这个模板试图加载组件组件的NuGet.VisualStudio。互操作、Version = 1.0.0.0、文化=中立,都必须b03f5f7f11d50a3a’。”。

5 个解决方案

#1


88  

I believe you do not have NuGet Package Manager extension installed.

我相信您没有安装NuGet包管理器扩展。

If not, you can click TOOLS -> Extensions and Updates... -> Online, select NuGet Package Manager, and click Download:

如果没有,您可以单击TOOLS ->扩展和更新…->在线,选择NuGet Package Manager,点击下载:

在2012年VS中创建MVC4项目时出现NuGet错误

After it downloads, you will be prompted for administrative elevation, and then to restart Visual Studio.

下载之后,将提示您进行管理提升,然后重新启动Visual Studio。

Tested in: Visual Studio Ultimate 2012 (Version 11.0.60610.01 Update 3)

测试版本:Visual Studio Ultimate 2012(版本11.0.60610.01更新3)

UPDATE: I've just came across this problem in Visual Studio 2012. So despite some comments here, it is not necessarily installed by default.

更新:我刚刚在Visual Studio 2012中遇到这个问题。因此,尽管这里有一些评论,但它并不一定是默认安装的。

#2


20  

i) Open Visual Studio > Tools > Extensions and Updates > select 'NuGet Package Manager' and uninstall it.(if it's not installed go to step 2)

i)打开Visual Studio >工具>扩展并更新>选择“NuGet Package Manager”并卸载。(如果没有安装,请转到步骤2)

ii) Open this url 'http://nuget.org' and you will see an 'Install NuGet' link , download it(NuGet.Tools.vsix) and install it on your Visual Studio .

打开这个url“http://nuget.org”,您将看到一个“安装NuGet”链接,下载它(NuGet.Tools.vsix)并将其安装到您的Visual Studio中。

iii) Close and Re-open the Visual Studio and i believe you will never see that error Dialog again just like me ;-)

关闭并重新打开Visual Studio,我相信您再也不会像我一样看到错误对话框了;

#3


5  

Same issue.

相同的问题。

"Error: this template attempted to load component assembly 
'NuGet.VisualStudio.Interop .... "
when creating a new Web Role project in VS 2012.

Selecting:

选择:

  • TOOLS
  • 工具
  • Extensions and Updates
  • 扩展和更新
  • Online
  • 在线
  • Select NuGet Package Manager
  • 选择NuGet包管理器
  • Click Download
  • 点击下载
  • i could see NuGet was installed already
  • 我可以看到NuGet已经安装了
  • I removed it
  • 我删除了它
  • installed it again
  • 安装一遍
  • restarted VS
  • 重新启动和

Resolved.

解决。

Thanks for the information above + 1. Scott

感谢以上信息+ 1。斯科特

#4


2  

you might want to search and check the dll exists under \Microsoft Visual Studio 11.0\Common7\IDE\Extensions\ (it would be in a folder under extensions with other nuget binaries). If it doesn't exist you can try uninstalling and re-installing nuget. to uninstall: tools->extensions and updates -> installed (on the left pane)-> nuget package manager to install: tools->extensions and updates -> online->visualstudio gallery -> nuget package manager

您可能想要搜索和检查dll存在于Microsoft Visual Studio 11.0\Common7\IDE\扩展\(它将与其他nuget二进制文件一起放在扩展目录下)。如果它不存在,您可以尝试卸载和重新安装nuget。要卸载:工具->扩展和更新->安装(在左边窗格)-> nuget包管理器安装:工具->扩展和更新->在线->visualstudio gallery -> nuget包管理器

#5


0  

Open Visual Studio and go to Tools- > Open Extension Manager or Extension and Updates - > Uninstall Nuget Package Manager -> Then Download Nuget Manager again from Online Gallery and then restart visual studio and you wont see the error message.

打开Visual Studio,进入工具->打开扩展管理器或扩展和更新->卸载Nuget包管理器->然后再从在线画廊下载Nuget管理器,然后重新启动Visual Studio,您将看不到错误消息。

#1


88  

I believe you do not have NuGet Package Manager extension installed.

我相信您没有安装NuGet包管理器扩展。

If not, you can click TOOLS -> Extensions and Updates... -> Online, select NuGet Package Manager, and click Download:

如果没有,您可以单击TOOLS ->扩展和更新…->在线,选择NuGet Package Manager,点击下载:

在2012年VS中创建MVC4项目时出现NuGet错误

After it downloads, you will be prompted for administrative elevation, and then to restart Visual Studio.

下载之后,将提示您进行管理提升,然后重新启动Visual Studio。

Tested in: Visual Studio Ultimate 2012 (Version 11.0.60610.01 Update 3)

测试版本:Visual Studio Ultimate 2012(版本11.0.60610.01更新3)

UPDATE: I've just came across this problem in Visual Studio 2012. So despite some comments here, it is not necessarily installed by default.

更新:我刚刚在Visual Studio 2012中遇到这个问题。因此,尽管这里有一些评论,但它并不一定是默认安装的。

#2


20  

i) Open Visual Studio > Tools > Extensions and Updates > select 'NuGet Package Manager' and uninstall it.(if it's not installed go to step 2)

i)打开Visual Studio >工具>扩展并更新>选择“NuGet Package Manager”并卸载。(如果没有安装,请转到步骤2)

ii) Open this url 'http://nuget.org' and you will see an 'Install NuGet' link , download it(NuGet.Tools.vsix) and install it on your Visual Studio .

打开这个url“http://nuget.org”,您将看到一个“安装NuGet”链接,下载它(NuGet.Tools.vsix)并将其安装到您的Visual Studio中。

iii) Close and Re-open the Visual Studio and i believe you will never see that error Dialog again just like me ;-)

关闭并重新打开Visual Studio,我相信您再也不会像我一样看到错误对话框了;

#3


5  

Same issue.

相同的问题。

"Error: this template attempted to load component assembly 
'NuGet.VisualStudio.Interop .... "
when creating a new Web Role project in VS 2012.

Selecting:

选择:

  • TOOLS
  • 工具
  • Extensions and Updates
  • 扩展和更新
  • Online
  • 在线
  • Select NuGet Package Manager
  • 选择NuGet包管理器
  • Click Download
  • 点击下载
  • i could see NuGet was installed already
  • 我可以看到NuGet已经安装了
  • I removed it
  • 我删除了它
  • installed it again
  • 安装一遍
  • restarted VS
  • 重新启动和

Resolved.

解决。

Thanks for the information above + 1. Scott

感谢以上信息+ 1。斯科特

#4


2  

you might want to search and check the dll exists under \Microsoft Visual Studio 11.0\Common7\IDE\Extensions\ (it would be in a folder under extensions with other nuget binaries). If it doesn't exist you can try uninstalling and re-installing nuget. to uninstall: tools->extensions and updates -> installed (on the left pane)-> nuget package manager to install: tools->extensions and updates -> online->visualstudio gallery -> nuget package manager

您可能想要搜索和检查dll存在于Microsoft Visual Studio 11.0\Common7\IDE\扩展\(它将与其他nuget二进制文件一起放在扩展目录下)。如果它不存在,您可以尝试卸载和重新安装nuget。要卸载:工具->扩展和更新->安装(在左边窗格)-> nuget包管理器安装:工具->扩展和更新->在线->visualstudio gallery -> nuget包管理器

#5


0  

Open Visual Studio and go to Tools- > Open Extension Manager or Extension and Updates - > Uninstall Nuget Package Manager -> Then Download Nuget Manager again from Online Gallery and then restart visual studio and you wont see the error message.

打开Visual Studio,进入工具->打开扩展管理器或扩展和更新->卸载Nuget包管理器->然后再从在线画廊下载Nuget管理器,然后重新启动Visual Studio,您将看不到错误消息。