Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nuget (PowerShell 2.0 Error) Visual Studio 2015, Windows 10 (PwrShl 5.0)

I am using Visual Studio 2015, on Windows 10 - I am having an issue running the Nuget Console, it wants Powershell 2.0. I do infact have powershell installed, but its version 5.0

I don't really understand why 5 wouldn't be compatible with 2? or why nuget cant find 5 when 2 is not installed?

  • I've tried install 2, didn't work

  • I've tried the usual change permissions for nuget package signing, didn't work either

Any one got a suggestion? I'm sure it must be possible!

I need to download the latest Google Custom Search API, and it seems that Nuget is the only way to do it, but if not, then a link to direct download of the API would be just as useful for now! (I've got almost everything from google API, except search lol)

I've also tried installing the (Google Search API) packages manually via PowerShell 5.0, but it cant find them, as far as I am aware, the repositories should already be added, but perhaps not?

Full Error Message:

Error: The Package Manager Console requires PowerShell 2.0 runtime, which is not detected on this machine. Please install the PowerShell 2.0 from support.microsoft.com/kb/968929 and restart Visual Studio

like image 991
John Miszt Avatar asked Aug 14 '15 08:08

John Miszt


1 Answers

You need to install Powershell 2.0. On Windows 10 you can follow these steps:

  1. Go to This Pc
  2. Click Uninstall or change a program on computer tab
  3. Click Turn Windows features on or off
  4. Mark Poweshell 2.0 for installation
  5. Click OK

Or open powershell as admin and :

  1. PS> Install-WindowsFeature PowerShell-V2
like image 171
Tamas Toth Avatar answered Sep 18 '22 13:09

Tamas Toth