PowerShell 2.0 ICmdletProviderSupportsHelp 在哪里实施?
似乎 System.Management.Automation 程序集仅存在于我的系统上的版本 1.0.0.0 中,可在 GAC 以及以下文件夹中找到:
%ProgramFiles%\Reference Assemblies\Microsoft\WindowsPowerShell\v1.0
我可以确认我确实安装了 PowerShell 2.0,不过,由于我支持 PowerShell 模块和从 shell 进行远程处理...
通过 Reflector,我可以观察到 ICmdletProviderSupportsHelp 接口肯定不存在。 那么问题来了,它在哪里实现呢?
It seems the System.Management.Automation assembly only ever exists in version 1.0.0.0 on my system, available in the GAC as well as in the following folder:
%ProgramFiles%\Reference Assemblies\Microsoft\WindowsPowerShell\v1.0
I can confirm that I do have PowerShell 2.0 installed, though, since I have support for PowerShell modules and remoting working from the shell...
Looking through Reflector, I can observe that the ICmdletProviderSupportsHelp interface is definitely not there.
So, the question is, where is it implemented?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要获取 PSH V2 中新增功能的参考程序集,您需要最新版本(V7 或更高版本)的 Windows SDK。
但请注意,它们仍然显示为 V1.x,例如强名称
System.Management.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
。但文件版本是 6.1.7600.16385,它比 V1 中的参考程序集要晚,并且它确实包含
ICmdletProviderSupportsHelp
。(在我看来,缺乏版本更改似乎是因为希望 PSH V1 具有 100% 的向前兼容性:V2 程序集添加了一些内容,但没有删除或更改 V1 中存在的任何内容。)
To get the reference assemblies for the additions in PSH V2 you need a recent (V7 or later) version of the Windows SDK.
But note that these still appear as V1.x, e.g. strong name
System.Management.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
.But the file version is 6.1.7600.16385, which is later than the reference assemblies from V1, and it does contain
ICmdletProviderSupportsHelp
.(This lack of a version change seems, to me, to be down to wanting 100% forward compatibility from PSH V1: the V2 assemblies add things, but do not remove or change anything that existed for V1.)