Referencing system.management.automation.dll in Vi

2019-01-07 04:50发布

I am beginning to look into the PowerShell model and snap-in development. The first thing I notice is to reference System.management.automation.dll. However in Visual Studio, the .NET tab does not have that assembly, and nor is one able browse to

C:\windows\assembly\GAC_MSIL\System.Management.Automation\1.0.0.0__31bf3856ad364e35\System.Management.Automation.dll

to make a file-based reference.

Am i forced to copy the file out manually to make an easy reference?

8条回答
趁早两清
2楼-- · 2019-01-07 05:32

if it is 64bit them - C:\Program Files (x86)\Reference Assemblies\Microsoft\WindowsPowerShell**3.0**

and version could be different

查看更多
你好瞎i
3楼-- · 2019-01-07 05:36

You can also use nuget: https://www.nuget.org/packages/System.Management.Automation/ It is maybe a better option.

查看更多
登录 后发表回答