[英]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. 你好我是新来的,所以请耐心等待,我刚刚在我的windows 10 pro机器上安装了Visual Studio 2015。
Am having problems with the version of PowerShell. 我遇到了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. 它希望我使用3.0或更高版本,但我似乎无法将软件包管理器控制台升级到最新版本。
I do have PowerShell Version 5 installed but somehow the Package Manager Console is refusing to use it. 我安装了PowerShell版本5,但是软件包管理器控制台拒绝使用它。 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: 它出错,说要求Powershell 3.0或更高版本:
[The Entity Framework Core Package Manager Console Tools don't support PowerShell version 2.0. [实体框架核心软件包管理器控制台工具不支持PowerShell 2.0版。 Upgrade to PowerShell version 3.0 or higher, restart Visual Studio, and try again.] 升级到PowerShell 3.0或更高版本,重新启动Visual Studio,然后重试。]
I run $PSVersionTable
it returns 我运行$PSVersionTable
它返回
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 谢谢
由于你升级了powershell,只需重新启动你的windows机器,以便可以应用注册表更新,然后检查它是否不起作用或者你已经做过,然后我怀疑它需要一个旧版本的powershell,已知可以正常使用该版本的visual studio ,那么你可以使用更新版本的VS说2017。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.