Search code examples
powershellvisual-studio-2013nugetcommand-line-tool

Can't install any package via command line tool with -Version switch


Does anyone else experience this? I reported this issue like over 2 months ago. Not 1 reply on codeplex.

I'm using visual studio 2013 ultimate with update 1. Package Manager Console Host Version 2.8.50313.46.

This is the message I get if I try to install (for example) T4MVC:

PM> Install-Package T4MVC -Version 3.8.0 Install-Package : Unable to find version '3.8.0' of package 'T4MVC'. At line:1 char:16 + Install-Package <<<< T4MVC -Version 3.8.0 + CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

If I don't use the -Version switch, it works fine.

For now, I'm looking for a work-around. Can't effort to wait another 2 months or something.

If anyone could help me with this issue, please do so! I'd really really really appreciate it!


Solution

  • In the Package Manager Console (PMC) there is a drop down menu at the top-left side with the label "Package source:". The selected text was "Microsoft and .NET", while it should have been "nuget.org". Changing it from "Microsoft and .NET" to "nuget.org" fixed the problem.

    This really really really sucked!