kayboy247
kayboy247

Reputation: 41

PowerShell Version on Package Manager Console

Hello guys I am new at this so please bear with me, I have just installed Visual Studio 2015 on my windows 10 pro machine.

Am having problems with the version of PowerShell. It wants me to use version 3.0 or above but I cant seem to upgrade the Package Manager Console to the latest version.

I do have PowerShell Version 5 installed but somehow the Package Manager Console is refusing to use it. I have done a full uninstall and re-install be hasn’t sort the problem. Can you help please

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]

It errors, saying Powershell 3.0 or above is required:

[The Entity Framework Core Package Manager Console Tools don't support PowerShell version 2.0. Upgrade to 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

Thanks

Upvotes: 4

Views: 1734

Answers (1)

russ from E2W
russ from E2W

Reputation: 21

Since you upgraded powershell just reboot your windows machine so that registry updates may be applied, then check if it does not work or you did already then i suspect it requires a older version of powershell that is known to work ok with that version of visual studio, so then you could use a newer version of VS say 2017.

Upvotes: 1

Related Questions