System.Management.Automation的2.0版本?

编程入门 行业动态 更新时间:2024-10-28 14:29:10
本文介绍了System.Management.Automation的2.0版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

System.Management.Automation程序集是否有2.0(或更高版本)版本?

Is there a 2.0 (or greater) version of the System.Management.Automation assembly?

我正在查看 PowerShell 类在C#中表示该类是在PowerShell 2.0中引入的.该版本号是否与在Visual Studio中将引用添加到程序集时看到的版本号相对应?

I'm looking at the PowerShell class in C# which says that this class was introduced with PowerShell 2.0. Does that version number correspond with the version number I'm seeing when I add the reference to the assembly in Visual Studio?

对于我的其他问题,这是一个额外的问题关于解决该程序集中的PowerShell类有麻烦.

This is kind of an additional question to my other question which is in regards to having trouble resolving the PowerShell class inside that assembly.

我已经在两个GAC中尝试了System.Management.Automation程序集:

I've tried the System.Management.Automation assembly in both the GAC:

C:\Windows\assembly\GAC_MSIL\System.Management.Automation\1.0.0.0__31bf3856ad364e35

和Reference Assemblies:

C:\Program Files\Reference Assemblies\Microsoft\WindowsPowerShell\v1.0

两个文件夹都只有1.0版

Both containing folders only have version 1.0

我已安装PowerShell 2.0.

I have PowerShell 2.0 installed.

推荐答案

powershell v1和powershell v2的强名称版本为1.0.0.0.令人惊讶的是,但这是向后兼容设计的功能. powershell v1和v2均在CLR2上运行. Powershell v3在CLR4上运行,因此他们将强名称版本更改为3.0.0.0.

The strong name version for both powershell v1 and powershell v2 is 1.0.0.0. Surprising, yes, but this is a function of the backwards compatibility design. Both powershell v1 and v2 run on CLR2. Powershell v3 runs on CLR4, so they bumped the strong name version to 3.0.0.0 for that one.

为了进一步混淆,所有版本的Windows文件夹名称均为v1.0-出于兼容性考虑.

Just to confuse matters further, the windows folder name for all versions is v1.0 - again, for reasons of compatibility.

您实际运行真正的Powershell v1.0的唯一方法是在Windows XP,Vista或Server 2003/2008上.如果您运行的是Windows 7、2008r2,则至少要使用v2.如果您使用的是8或2012,则至少要使用Powershell v3.

The only way you could actually be running the real powershell v1.0 is if you're on windows XP, vista or server 2003/2008. If you are running windows 7, 2008r2, you are on v2 at a minimum. If you are on 8 or 2012, you are on v3 of powershell at a minimum.

我希望这会有所帮助.

更多推荐

System.Management.Automation的2.0版本?

本文发布于:2023-11-08 22:24:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1570612.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:版本   Management   System   Automation

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!