Install-Package : Unable to find package 'WebActivator' - c#

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
PM> Install-Package WebActivator
and i get the following error
How i can resolve this and install WebActivator package?

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":
I hope this can be help someone.

So easy
https://www.nuget.org/packages/WebActivator
Need point version of webActivator!!!
PM> Install-Package WebActivator -Version 1.5.3

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.

Change source according to visual studio version
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

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.

Related

Error installing Microsoft.Azure.CosmosDB.Table NuGet

Trying to install Microsoft.Azure.CosmosDB.Table version 1.1.3, but keep getting the error
Unable to resolve dependency 'Microsoft.Azure.Storage.Common'.
Source(s) used: 'nuget.org', 'Microsoft Visual Studio Offline
Packages'
My current project is from the Azure QnA bot template
Any help with this would be much appriciated!
Error installing Microsoft.Azure.CosmosDB.Table NuGet
This is a known issue on GitHub, if project is configured to use packages.config this issue will manifest itself.
And this issue is fixed for PackageReference. NuGet team are determining if needs to fix this for packages.config, or leave it as is.
Before add nuget package, go to Tools-Options->NuGet Package Manager->General, change the default package management format to PackageReference. Then restart the Visual Studio, reload your project, add that package.
If you still get the same error, please check following Troubleshooting:
Use Package Manage Console to install the Microsoft.Azure.CosmosDB.Table package and its dependencies. To do
this, type the following in the Package Manager Console for your
solution.
Install-Package Microsoft.Azure.CosmosDB.Table -IncludePrerelease
Using your preferred Nuget package management tool, install the Microsoft.Azure.Storage.Common Nuget package before installing
Microsoft.Azure.CosmosDB.Table.
Hope this helps.

Package requires NuGet client version '2.12'

I am trying to install 'WindowsAzure.Storage 8.0.1' in visual studio 2012, but getting the error
package requires NuGet client version '2.12' or above, but the current NuGet version is '2.8.60318.667'.
on running command "Install-Package NuGet.Client"
Attempting to resolve dependency 'NuGet.Versioning (≥ 3.5.0)'.
Attempting to resolve dependency 'NuGet.Packaging (≥ 3.5.0)'.
Attempting to resolve dependency 'NuGet.Common (≥ 3.5.0)'.
Attempting to resolve dependency 'NuGet.Packaging.Core (≥ 3.5.0)'.
Attempting to resolve dependency 'NuGet.Packaging.Core.Types (≥ 3.5.0)'.
Attempting to resolve dependency 'NuGet.Frameworks (≥ 3.5.0)'.
Attempting to resolve dependency 'NuGet.Repositories (≥ 3.5.0)'.
Attempting to resolve dependency 'NuGet.RuntimeModel (≥ 3.5.0)'.
Attempting to resolve dependency 'Newtonsoft.Json (≥ 6.0.4)'.
Attempting to resolve dependency 'NuGet.ContentModel (≥ 3.5.0)'.
'NuGet.Client 3.5.0' already installed.
But still I am getting the error.
The 'WindowsAzure.Storage 8.0.1' package requires NuGet client version '2.12' or above, but the current NuGet version is '2.8.60318.667'.
Update your NuGet Package Manager extension. Go to Tools->Extensions and Updates and select Updates->Visual Studio Gallery. Update the NuGet Package Manager extension. Then try to install the package after Visual Studio gets restarted.
NuGet 2.12 only supports Visual Studio 2013 and later. If you're on Visual Studio 2012 you're out of luck.
I struggled with this issue in Visual Studio 2010 when I was trying to add NewtonSoft.Json nuget package into my project. When I try to run the latest version of the nuget package from nuget package manager console:
PM> Install-Package Newtonsoft.Json
It results in the same error as mentioned by OP:
package requires NuGet client version '2.12' or above, but the current
NuGet version is '2.8.60318.667'.
So I thought I would update the NuGet extension in Visual Studio first to latest version. But when I went into Tools -> Extensions and Updates window the Updates tab wasn't showing any update for Nuget extension. So it seems NuGet client version 2.12 isn't available/supported in Visual Studio 2010 at all. I was running out of options now.
So finally, I tried to install a specific lower version (6.0.3) of Newtonsoft.Json package deliberately this way:
PM> Install-Package Newtonsoft.Json {Your Project Name} 6.0.3
This worked successfully.
Latest version of this package at the time of writing this post is 10.0.3 instead.
So, it might be the case that newer version of a nuget package is compatible with only latest version of nuget package manager. So sometimes explicitly installing a lower version of the package might help you. Older version of a nuget package will of course be compatible with older nuget extension in Visual Studio if it is not up-to-date.
The only caveat in this solution is that the functionalities present in lower version of the nuget package you target should suffice your current project needs. Good luck!
Note: Although I've elaborated this solution w.r.t. Visual Studio 2010 but you can try this work around for any Visual Studio version for that matter.
I find out the solution for this problem.
Basically you have a .nuget folder at solution level, that folder contains a nuget.exe file that probably is old. A lot of packages might need new version of that file.
Open this link: https://www.nuget.org/downloads
Download latest version of nuget.exe
Replace your .nuget/nuget.exe with this new version.
And try again, I'm confident it will work.
try
nuget update -self
my result:
Checking for updates from https://www.nuget.org/api/v2/.
Currently running NuGet.exe 2.8.7.
Updating NuGet.exe to 5.3.1.
Update successful.
This fix worked for me(I am using vs 2013, not sure if it will work for the rest), Go to Tools --> Extensions and Updates, then look for NuGet package manager for visual studio 2013, uninstall it. In the left pane select online which will take you to visual studio gallery, in the right pane search for NuGet package manager for visual studio 2013, it will bring you the right version to install. Install that and you are good to go, hope this sorts someone out.
Install-Package Newtonsoft.Json -Version 6.0.3
I got the same issue and I just clicked on "Restore NuGet package for this solution". In my case this solved the problem. Hope it will help.
I solved this problem, and my steps are as below:
1.Do what as "Mathivanan KP" said;
2.Delete the folder ".nuget", which is below your solution folder;
3.Rebuild your solution;
4.Back to your solution folder, and press "Ctrl + Z", then rebuild your solution again.
If the problem still there, i think you should clone the code from version manager to a new folder, and do the steps as before.
Hope it helpful to you.
You are updating the wrong package. Update your Nuget Package Manager and the error will be gone.
Update-Package NuGet.VisualStudio
https://www.nuget.org/packages/NuGet.VisualStudio
I try everything but nothing helps me. Than I change Visual Studio version from 2012 to 2015 everything is working Like a charm now.

How to install System.Reactive extensions in a Visual Studio 2012 solution?

Visual Studio 2012 has nuget version 2.8.60318.667, that is not compatible with Reactive.Extensions 3.1.1.
If copy manually System.Reactive.* packages into the packages directory of my solution, when I launch the package manager from the Visual Studio UI, and I browse for installed package: instead of habing the list of installed package the following error is displayed:
'System.Reactive.Core' already has a dependency defined for 'System.Reactive.Interfaces'.
nugeterror
If I install package with de package manager command:
install-package System.Reactive
the following error is displayed:
The 'System.Reactive 3.1.1' package requires NuGet client version '2.8.1' or above, but the current NuGet version is '2.8.60318.667'.
Here is the answer I got from the support here:
<<
If you cannot use the System.Reactive. packages, as a temporary workaround you can manually install the old Rx-Main package from the Package Manager Console (I think this is the right arguments):
Install-Package Rx-Main -Version 2.2.5
Unfortunately we are unable to support older versions of NuGet, due to the packaging changes required to support .NET Standard.>>

NuGet Package Manager: 'AutoMapper' already has a dependency defined for 'Microsoft.CSharp'

I'm trying to add AutoMapper as a dependency to a project using NuGet on Visual Studio Premium 2012, but it fails.
It says:
Operation failed
'AutoMapper' already has a dependency defined for
'Microsoft.CSharp'.
I'm able to add other dependencies.
I'm using the last version of the package manager for VS 2012:
NuGet Package Manager 2.8.60318.667
Any ideas what should I check?
The problem is that your NuGet Package Manager is too old. You need NuGet 2.12 since this supports the newer .NETStandard frameworks that the AutoMapper 5.0.1 NuGet package is using.
The AutoMapper has a group dependency which specifies a target framework of .NETStandard. Since your version of NuGet Package Manager is too old it does not recognise this target framework and converts it to an Unknown target framework and you end up with duplicate frameworks since there .NETStandard is used a few times in that NuGet package. This causes the error:
'AutoMapper' already has a dependency defined for 'Microsoft.CSharp'
Unfortunately NuGet 2.12 is not available for Visual Studio 2012 but is available for Visual Studio 2013.
So either you need to update to Visual Studio 2013 or above, or you will have to use the older AutoMapper NuGet package which does not support .NETStandard.
Seems to be a problem with the current version of automapper:
AutoMapper 5.0.0 Tuesday, June 28, 2016
I tried with the previous version and it works:
PM> Install-Package AutoMapper -Verbose
Install-Package : 'AutoMapper' already has a dependency defined for 'Microsoft.CSharp'.
At line:1 char:16
+ Install-Package <<<< AutoMapper -Verbose
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
PM> Install-Package AutoMapper -Version 4.2.1
Installing 'AutoMapper 4.2.1'.
Successfully installed 'AutoMapper 4.2.1'.
So, if you can't update NuGet Package Manager, the answer is:
PM> Install-Package AutoMapper -Version 4.2.1
I ended up needing to update NuGet.exe that was included in the solution to be able to build NuGet packages by running:
nuget.exe update -self
I had the same issue on VS2013. I had to update to VS2013 Update 5 and get the latest nuget distro for VS2013 at
https://dist.nuget.org/visualstudio-2013-vsix/v2.12.0/NuGet.Tools.vsix
Once that was done, I rebooted Visual Studio. After that I was able to use the Automapper 5.0.2 package
Go to Visual Studio > Tools > Extension and Updates
Find Updates in left accordion menu, Go to Visual Studio Gallery.
You will find a update for Nuget.
Update the nuget package and try installing or builing the project.
Thanks,
GT
An other workaround if you're stuck with VS2012 and the old Nuget version:
Find the Cache folder of VS 2012's Nuget Package Manager (with Tools - Options - Nuget Package Manager)
Open AutoMapper.5.x.x.nupkg with your favorite Zip Tool
Modify the file AutoMapper.nuspec - I simply deleted all dependencies except .NETFramework4.5
Add the cache folder as a Nuget source (also in Tools - Options - Nuget Package Manager)
Install Automapper either with the console or the GUI but make sure to choose first the newly added cache folder as package source.
Of course, the next version of Automapper probably needs to be adapted, too, in order to install it.
This looks like a mismatch between the .NET version used by the Automapper package and your project. Can you confirm the .NET version that your project is using?
Automapper 6.0.2 - nuget 2.8.8 gives this error. Needed to update to 3.4.4 to get this working.
Removed both CSharp and AutoMapper. Installed CSharp (4.0.0.0) first and then added Automapper (6.1.1.0). This resolved the problem for me.
I observed this exact problem when opening a project with Visual Studio 2010.
After opening with VS2017, I was able to install AutoMapper without any error.

Unable to find version '5.0.0.0' of package 'entity framework'

I am trying to install Entity Framework for MVC application.But I am getting following error:
Install-Package : Unable to find version '5.0.0.0' of package 'entityframework'
I was struck with the same issue and the below steps resolved the problem
Right click on the Project which throws the Nuget error
Select Manage NuGet Packages..
Click on Settings button in the bottom left corner
Under Available package sources,Select the checkbox nuget.org
Click on OK.
Now the packages will be automatically downloaded from the site.
Try installing the package by right-clicking on the project in visual studio -> 'Manage NuGet Packages' and search for EntityFramework.
Entity framework 5 is uploaded without the latest 0 on the version.
This should work
Install-Package EntityFramework -Version 5.0.0
For other versions look here
http://www.nuget.org/packages/EntityFramework/
It Worked .I went to http://www.nuget.org/packages/EntityFramework and then installed NuGet using Visual Studio Extension Manager and then in the console window I gave command Install-Package EntityFramework -Version 5.0.0 and it worked out.
I faced same issue. When i checked my proxy and made sure that internet connection is fine and has a reach over NuGet links, restarting VS later solved my problem.

Categories

Resources