PowerShell 版本 4 或版本 5 程序集的参考路径
reference path of PowerShell version 4 or version 5 assembly
我想在我的 C# 应用程序中托管 PowerShell 版本 5 的程序集,我安装了 .NET Framework4.7,
我只从以下路径中找到 System.management.automation.dll
:
C:\Program Files (x86)\Reference Assemblies\Microsoft\WindowsPowerShell.0\System.Management.Automation.dll
C:\windows\assembly\GAC_MSIL\System.Management.Automation
PowerShell V5 的程序集是哪个?
提前致谢!
如果您想引用主机上已安装的 Powershell 版本,您需要将对 System.Management.Automation.Powershell
的引用添加到您的项目中。文章 Windows Powershell Host Quickstart 为您提供了详细信息。
我想在我的 C# 应用程序中托管 PowerShell 版本 5 的程序集,我安装了 .NET Framework4.7,
我只从以下路径中找到 System.management.automation.dll
:
C:\Program Files (x86)\Reference Assemblies\Microsoft\WindowsPowerShell.0\System.Management.Automation.dll
C:\windows\assembly\GAC_MSIL\System.Management.Automation
PowerShell V5 的程序集是哪个? 提前致谢!
如果您想引用主机上已安装的 Powershell 版本,您需要将对 System.Management.Automation.Powershell
的引用添加到您的项目中。文章 Windows Powershell Host Quickstart 为您提供了详细信息。