开发者

Building a Snap-in Targeting PowerShell V1 and PowerShell V2

How do I build a PowerShell snap-in to target PowerShell v1 and v2? Given that v1 and v2 can't be installed side by side how can I reference the appropriate assemblies and build against them?

Inevitably as things go on I'm going to be adding new PowerShell v2 specific features. So I'm going to need separate product builds targ开发者_如何转开发eting different versions of PowerShell.


We do that with the PowerShell Community Extensions 1.2. We just reference the PowerShell 1.0 version of System.Management.Automation but AFAICT there is only a 1.0 version of this assembly. Anyway, the snapin loads and runs fine in both PowerShell 1.0 and 2.0.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜