none
Error: The Package Manager Console requires PowerShell 2.0 runtime

    Question

  • Server Configuration

    Windows Server 2016 Standard

    Visual studio 2017 Community

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

    Errors comes in Visual studio 2015 also.

    Please help

    Monday, March 27, 2017 10:44 PM

All replies

  • Hi,

    I think it is not a known issue:

    https://docs.microsoft.com/en-us/nuget/release-notes/known-issues

    For VS 2015 download the latest published NuGet Package Manager for Visual Studio 2015 from the VS Marketplace:

    https://marketplace.visualstudio.com/items?itemName=NuGetTeam.NuGetPackageManagerforVisualStudio2015

    If PowerShell 2.0 is really installed and the problem persists, see if it is reported at GitHub:

    https://github.com/Nuget/home/issues

    You will find a similar reported problem for Windows 10, but fixed:

    https://github.com/NuGet/Home/issues/3086

    If not reported, open a bug issue at GitHub.


    My portal and blog about VSX: http://www.visualstudioextensibility.com; Twitter: https://twitter.com/VSExtensibility; MZ-Tools productivity extension for Visual Studio: https://www.mztools.com

    Tuesday, March 28, 2017 11:39 AM
  • Hi JackSnyder,

    Welcome to the MSDN forum.

    Refer to the error message, it looks like the PowerShell 2.0 not installed or enabled on your computer. Please have a look at this: Installing the Windows PowerShell 2.0 Engine and use the following steps to add the Windows PowerShell 2.0 Engine and Microsoft .NET Framework 3.5 features.

    To add the .NET Framework 3.5 feature

    1. In Server Manager, from the Manage menu, select Add Roles and Features.

    Or in Server Manager, click All Servers, right-click a server name, and then select Add Roles and Features.

    1. On the Installation Type page, select Role-based or feature-based installation.
    2. On the Features page, expand the .NET 3.5 Framework Features node and select .NET Framework 3.5 (includes .NET 2.0 and 3.0).

    The other options under that node are not required for the Windows PowerShell 2.0 Engine.

    To add the Windows PowerShell 2.0 Engine feature

    • In Server Manager, from the Manage menu, select Add Roles and Features.

    Or Server Manager, click All Servers, right-click a server name, and then select Add Roles and Features.

    • On the Installation Type page, select Role-based or feature-based installation.
    • On the Features page, expand the Windows PowerShell (Installed) node and select Windows PowerShell 2.0 Engine.

    After that, if this issue persists, please open VS 2015, go to Tools-Extensions and Updates..-Installed and uninstall the extension ‘NuGet Package Manager for Visual Studio 2015’. Then download the latest NuGet Package Manager for Visual Studio 2015 like Carlos said to re-install it.

    For VS 2017, you can try to re-run the VS 2017 installer as administrator, click the icon besides ‘Modify’ and ‘Launch’ and choose ‘Repair’ to repair it.

    Best regards,

    Sara


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, March 29, 2017 5:45 AM
    Moderator
  • The simplest solution is to enable the Powershell v2.0 optional feature using Powershell itself:

    Enable-WindowsOptionalFeature –FeatureName "MicrosoftWindowsPowerShellV2" -Online -All

    you can then check it's status:

    Get-WmiObject -query "select * from Win32_OptionalFeature where name like '%powershellV2%'"

     

    More importantly the Package Manage Console should now be working as expected.

    Michael McD.


    Saturday, June 3, 2017 4:08 PM