-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
documentationAn issue or feature that affects documentation instead of codeAn issue or feature that affects documentation instead of code
Description
When importing PSDocs module, importing PSDocs.Format.ps1xml may fail if PSDocs.dll is blocked by Windows because it was downloaded from the PowerShell Gallery.
Import-Module : Errors occurred while loading the format data file:
C:\Program Files\WindowsPowerShell\Modules\PSDocs\0.7.0\PSDocs.Format.ps1xml, Error at XPath
/Configuration/ViewDefinitions/View[1] in file C:\Program
Files\WindowsPowerShell\Modules\PSDocs\0.7.0\PSDocs.Format.ps1xml: A node is missing from TableControl, ListControl,
WideControl, CustomControl.
C:\Program Files\WindowsPowerShell\Modules\PSDocs\0.7.0\PSDocs.Format.ps1xml, Error at XPath
/Configuration/ViewDefinitions/View[1]/TableControl/TableHeaders in file C:\Program
Files\WindowsPowerShell\Modules\PSDocs\0.7.0\PSDocs.Format.ps1xml: The column header definition is not valid; all
headers are discarded.
C:\Program Files\WindowsPowerShell\Modules\PSDocs\0.7.0\PSDocs.Format.ps1xml, Error at XPath
/Configuration/ViewDefinitions/View[1]/TableControl/TableHeaders/TableColumnHeader[1]/Label in file C:\Program
Files\WindowsPowerShell\Modules\PSDocs\0.7.0\PSDocs.Format.ps1xml: The resource PSDocs.Resources.ViewStrings in
assembly C:\PSDocs is not found.
At line:1 char:1
+ Import-Module PSDocs.Azure
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Import-Module], RuntimeException
+ FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand
We should add a note for troubleshooting this issue.
It can be fixed by using Unblock-File.
For example:
Get-ChildItem -Path 'C:\Program Files\WindowsPowerShell\Modules\PSDocs\' | Unblock-File;See issue Azure/PSDocs.Azure#25.
Metadata
Metadata
Assignees
Labels
documentationAn issue or feature that affects documentation instead of codeAn issue or feature that affects documentation instead of code