4

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

8
  • 2
    At what point are you experiencing the probme (ie how can I try to recreate it?) Also, are you receiving any error messages? You should add any of these details to your question Commented Jan 5, 2017 at 10:51
  • I have added more info Commented Jan 5, 2017 at 11:10
  • Is the above version output when you run $PSVersionTable in the nuget console window? If you run that in a normal PowerShell window does it say you have version 5 installed? Commented Jan 5, 2017 at 11:39
  • Yes it returns PSVersion : 5.1.14393.576 when $PSVersionTable is ran on a normal PowerSheel window Commented Jan 5, 2017 at 11:55
  • You could try re-install NuGet, or uninstall PowerShell tools for VS if you have that and see if it helps Commented Jan 5, 2017 at 12:42

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.