platyPS
platyPS copied to clipboard
OPS12 Import-MamlHelp errors on some MAML files
Prerequisites
- [X] Write a descriptive title.
- [X] Make sure you are able to repro it on the latest released version
- [X] Search the existing issues.
Steps to reproduce
- Example file that produces the error Microsoft.PowerShell.SecretStore.dll-Help.xml.zip
Expected behavior
Import-MamlHelp -Path 'C:\Program Files\PowerShell\Modules\Microsoft.PowerShell.SecretStore\1.0.6\en-US\Microsoft.PowerShell.SecretStore.dll-Help.xml'
Actual behavior
Import-MamlHelp: 'None' is an invalid XmlNodeType.
Error details
PS> Get-Error
Exception :
Type : System.Xml.XmlException
Message : 'None' is an invalid XmlNodeType.
TargetSite :
Name : ReadEndElement
DeclaringType : [System.Xml.XmlReader]
MemberType : Method
Module : System.Private.Xml.dll
Source : System.Private.Xml
HResult : -2146232000
StackTrace :
at System.Xml.XmlReader.ReadEndElement()
at Microsoft.PowerShell.PlatyPS.TransformMaml.ReadDescription(XmlReader reader) in
D:\Git\PS-Src\platyPS\src\Transform\TransformMaml.cs:line 621
at Microsoft.PowerShell.PlatyPS.TransformMaml.ReadParameter(XmlReader reader, Int32 parameterSetCount) in
D:\Git\PS-Src\platyPS\src\Transform\TransformMaml.cs:line 535
at Microsoft.PowerShell.PlatyPS.TransformMaml.ReadSyntaxItem(XmlReader reader, String unnamedParameterSetName) in
D:\Git\PS-Src\platyPS\src\Transform\TransformMaml.cs:line 424
at Microsoft.PowerShell.PlatyPS.TransformMaml.ReadSyntaxItems(XmlReader reader) in
D:\Git\PS-Src\platyPS\src\Transform\TransformMaml.cs:line 392
at Microsoft.PowerShell.PlatyPS.TransformMaml.ReadCommand(String moduleName, XmlReader reader) in
D:\Git\PS-Src\platyPS\src\Transform\TransformMaml.cs:line 104
at Microsoft.PowerShell.PlatyPS.TransformMaml.ReadMaml(String mamlFile) in
D:\Git\PS-Src\platyPS\src\Transform\TransformMaml.cs:line 72
at Microsoft.PowerShell.PlatyPS.TransformMaml.Transform(String[] mamlFileNames) in
D:\Git\PS-Src\platyPS\src\Transform\TransformMaml.cs:line 39
at Microsoft.PowerShell.PlatyPS.ImportMamlHelpCommand.ProcessRecord() in
D:\Git\PS-Src\platyPS\src\Command\ImportMamlCommand.cs:line 48
TargetObject : C:\Program
Files\PowerShell\Modules\Microsoft.PowerShell.SecretStore\1.0.6\en-US\Microsoft.PowerShell.SecretStore.dll-Help.xml
CategoryInfo : InvalidOperation: (C:\Program Files\Po…tStore.dll-Help.xml:String) [Import-MamlHelp],
XmlException
FullyQualifiedErrorId : FailedToTransformMaml,Microsoft.PowerShell.PlatyPS.ImportMamlHelpCommand
InvocationInfo :
MyCommand : Import-MamlHelp
ScriptLineNumber : 1
OffsetInLine : 1
HistoryId : 187
Line : import-MamlHelp -Path 'C:\Program
Files\PowerShell\Modules\Microsoft.PowerShell.SecretStore\1.0.6\en-US\Microsoft.PowerShell.SecretStore.dll-Help.xml'
Statement : import-MamlHelp -Path 'C:\Program
Files\PowerShell\Modules\Microsoft.PowerShell.SecretStore\1.0.6\en-US\Microsoft.PowerShell.SecretStore.dll-Help.xml'
PositionMessage : At line:1 char:1
+ import-MamlHelp -Path 'C:\Program Files\PowerShell\Modules\Microsoft. …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
InvocationName : import-MamlHelp
CommandOrigin : Internal
ScriptStackTrace : at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo :
0
1
Environment data
OPS12
Visuals
No response