C# 安装包:无法找到包“WebActivator”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/18059464/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-10 11:10:48  来源:igfitidea点击:

Install-Package : Unable to find package 'WebActivator'

c#.netnugetwebactivator

提问by isxaker

I have Visual Studio 2012 Express for Web. My Steps -Create a New ASP .NET MVC 4 application -choose basic template -go to Package Manager Console -try to install WebActivator

我有 Visual Studio 2012 Express for Web。我的步骤 - 创建一个新的 ASP .NET MVC 4 应用程序 - 选择基本模板 - 转到包管理器控制台 - 尝试安装 WebActivator

PM> Install-Package WebActivator

and i get the following error enter image description here

我收到以下错误 在此处输入图片说明

How i can resolve this and install WebActivator package?

我如何解决这个问题并安装 WebActivator 包?

采纳答案by isxaker

So easy

太简单

https://www.nuget.org/packages/WebActivator

https://www.nuget.org/packages/WebActivator

Need point version of webActivator!!!

需要点版的webActivator!!!

PM> Install-Package WebActivator -Version 1.5.3 

回答by Brad Bruce

I just ran into this myself. The reference to WebActivatorEx didn't work. You'll have to do it manually. The file is in the packages directory.

我自己刚刚遇到了这个。对 WebActivatorEx 的引用不起作用。你必须手动完成。该文件位于包目录中。

回答by Fayssal El Mofatiche

In my case, I could not install any package and got a similar error. The issue was solved as I unchecked the "Microsoft and .NET" under "Machine-wide package source":

就我而言,我无法安装任何软件包并出现类似错误。当我取消选中“Machine-wide package source”下的“Microsoft and .NET”时,问题得到了解决:

enter image description here

在此处输入图片说明

I hope this can be help someone.

我希望这可以帮助某人。

回答by Gabriel

I got a similar problem with another package in Visual Studio 2013, I cleared the NuGet package cache with the option "Clear Package Cache" and it works now.

我在 Visual Studio 2013 中的另一个包中遇到了类似的问题,我使用“清除包缓存”选项清除了 NuGet 包缓存,现在它可以工作了。

enter image description here

在此处输入图片说明

回答by Moumit

Change source according to visual studio version

根据Visual Studio 版本更改源

NuGet feed v3 (VS 2015 / NuGet v3.x): https://api.nuget.org/v3/index.json
NuGet feed v2 (VS 2013 and earlier / NuGet 2.x): https://www.nuget.org/api/v2

enter image description here

在此处输入图片说明