PowerShell version in package manager console

Hi guys, I'm new to this, so please bear with me, I just installed Visual Studio 2015 on my Windows 10 pro computer.

I have problems with the PowerShell version. He wants me to use version 3.0 or higher, but I cannot upgrade the package manager console to the latest version.

I have PowerShell version 5 installed, but for some reason the Package Manager console refuses to use it. I did a complete uninstall and reinstall, so I did not sort the problem. You can help

I am currently working on this tutorial

when i run this code

[Scaffold-DbContext " 'Server=(localdb)\mssqllocaldb;Database=Blogging;Trusted_Connection=True; '" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Models]

These are bugs saying Powershell 3.0 or higher:

[Entity Framework Core Component Manager console tools do not support PowerShell version 2.0. Upgrade PowerShell version 3.0 or higher, restart Visual Studio and try again.]

I run $PSVersionTable, it returns

Name                           Value                                                                                                                                                                                                                    
----                           -----                                                                                                                                                                                                                    
PSVersion  ----------------------------2.0                                                                                                                                                                                                                      
PSCompatibleVersions -----------{1.0, 2.0}                                                                                                                                                                                                               
BuildVersion -------------------------6.1.7600.16385                                                                                                                                                                                                           
CLRVersion ------------------------- 4.0.30319.42000                                                                                                                                                                                                          
WSManStackVersion --------------2.0                                                                                                                                                                                                                      
PSRemotingProtocolVersion-----2.1                                                                                                                                                                                                                      
SerializationVersion----------------1.1.0.1

thank

+4
source share
1 answer

Since you updated powershell, just restart your Windows machine so that registry updates can be applied, and then check if it works or you already suspect that it requires an older version of powershell, which, as you know, works fine with this version of visual studio, so you could use a newer version of VS say 2017.

+1

Source: https://habr.com/ru/post/1665860/


All Articles