使用的PowerShell与.NET 3.5运行时/库

编程入门 行业动态 更新时间:2024-10-15 08:26:36
本文介绍了使用的PowerShell与.NET 3.5运行时/库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

是否可以运行PowerShell的1.0(或2.0 CTP)由3.5运行时,而不是2.0的支持?

Is it possible to run PowerShell 1.0 (or 2.0 CTP) backed by the 3.5 runtime instead of 2.0?

我们正在构建一个.NET 3.5的解决方案,而且我还是喜欢使用PowerShell作为我们的脚本引擎的计划任务等。

We're building a .NET 3.5 solution, and I'd still like to use PowerShell as our scripting engine for scheduled tasks, etc.

我不需要LINQ的语法或什么,只是3.5库和运行。

I don't need LINQ syntax or anything, just the 3.5 libraries and runtime.

跟帖:感谢您对动态加载程序集的答复。但是,让我澄清我的问题:有没有什么办法来运行PowerShell的,使得3.5库在默认情况下运行?所以,如果我进入新对象System.Xml.XmlDocument ,例如,我确实得到3.5版本的默认?

FOLLOWUP: thank you for the reply about dynamically loading assemblies. But let me clarify my question: is there any way to run PowerShell so that the 3.5 libraries run by default? So that if I enter New-Object System.Xml.XmlDocument, for example, I'm actually getting the 3.5 version by default?

半相关的问题:如果我的执行的有动态加载,比如,从3.5 的System.Xml 库,将它的重叠的现有的符号定义,使得的下一步的时候,我键入新对象System.Xml.XmlDocument ,它的将的加载3.5版本?

Semi-related question: if I do have to dynamically load, say, the System.Xml library from 3.5, will it overlay the existing symbol definitions such that the next time I type New-Object System.Xml.XmlDocument, it will load the 3.5 version?

推荐答案

如果您在系统上安装有3.5,也就是当你运行PowerShell的你会得到。

If you have 3.5 installed on your system, that is what you'll get when you run PowerShell.

PowerShell是唯一的需要安装的时候2.0,但3.0和3.5的兼容性,以及autoforward。在PowerShell的V2,我们实际上看,看看有什么版本,就和亮起来的某些功能(如PowerShell_ISE和Out-GridView控件可当你有3.51)。

PowerShell is only "requires" 2.0 but 3.0 and 3.5 are compatible and autoforward when installed. In PowerShell V2, we actually look to see what version you have and "light up" certain features (e.g. PowerShell_ISE and Out-GridView are available when you have 3.51).

实验!享受!搞!

杰弗里Snover [MSFT] Windows管理合伙人建筑师

Jeffrey Snover [MSFT] Windows Management Partner Architect

更多推荐

使用的PowerShell与.NET 3.5运行时/库

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

发布评论

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

>www.elefans.com

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