无法在Powershell

时间:2019-04-01 09:33:22

标签: powershell

初始化名称空间管理器时,收到一条错误消息,提示未找到构造函数。

我正在尝试运行$XmlNSManager = New-Object System.Xml.XmlNamespaceManager -ArgumentList $xml.NameTable并收到以下错误消息:

New-Object : A constructor was not found. Cannot find an appropriate constructor for type System.Xml.XmlNamespaceManager.
At line:1 char:17
+ ... NSManager = New-Object System.Xml.XmlNamespaceManager -ArgumentList $ ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (:) [New-Object], PSArgumentException
    + FullyQualifiedErrorId : CannotFindAppropriateCtor,Microsoft.PowerShell.Commands.NewObjectCommand
$XmlNSManager = New-Object System.Xml.XmlNamespaceManager -ArgumentList $xml.NameTable

0 个答案:

没有答案