简体   繁体   English

程序包管理器控制台上的PowerShell版本

[英]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.

相关问题 如何在 Visual Studio 中配置包管理器控制台使用的 powershell 版本? - how to configure the powershell version used by the package manager console in visual studio? NuGet包管理器控制台无法加载PowerShell - NuGet Package Manager Console unable to load PowerShell 在扩展中以编程方式访问visual studio的powershell控制台(包管理器控制台) - Access the powershell console (package manager console) of visual studio programmatically in an extension Nuget Package Manager控制台中有关PowerShell绑定的奇怪错误 - Strange errors in Nuget Package Manager Console about PowerShell bindings 如何在 Visual Studio 外使用包管理器控制台 powershell - How to use Package Manager Console powershell outside visual studio Powershell包含在Visual Studio中的程序包管理器控制台中的项目中 - Powershell Include In Project From Package Manager Console In Visual Studio Nuget Package Manager控制台无法执行EntityFramework PowerShell脚本 - Nuget Package Manager console unable to execute entityFramework powershell scripts 包管理器控制台问题 - Package Manager Console issues 如何确定在Powershell的Visual Studio程序包管理器控制台中选择的默认项目? - How do I determine the default project selected in the Visual Studio Package Manager Console in Powershell? 如何使用PowerShell更改VS Package Manager控制台的前景色? - How do you change the foreground color of the VS Package Manager Console with PowerShell?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM