8000 Errors occurred while loading the format data file · Issue #3057 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Errors occurred while loading the format data file #3057

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cdhunt opened this issue Jan 27, 2017 · 2 comments · Fixed by #4139
Closed

Errors occurred while loading the format data file #3057

cdhunt opened this issue Jan 27, 2017 · 2 comments · Fixed by #4139
Assignees
Labels
Resolution-Fixed The issue is fixed. WG-Engine core PowerShell engine, interpreter, and runtime
Milestone

Comments

@cdhunt
Copy link
cdhunt commented Jan 27, 2017

Steps to reproduce

Attempt to Import PowerShellHumanizer module v3.1.

Expected behavior

PowerShell loads the custom type data files.

Actual behavior

Errors about CustomEntries and CustonItem Xml nodes. An error about resource FileSystemProviderStrings missing from System.Management.Automation

ipmo : Errors occurred while loading the format data file:
C:\powershell6\Modules\PowerShellHumanizer\3.1\FileInfo.format.ps1xml, Error at XPath
/Configuration/Controls/Control[1]/CustomControl/CustomEntries in file
C:\powershell6\Modules\PowerShellHumanizer\3.1\FileInfo.format.ps1xml: CustomEntry failed to load.
C:\powershell6\Modules\PowerShellHumanizer\3.1\FileInfo.format.ps1xml, Error at XPath
/Configuration/Controls/Control[1]/CustomControl/CustomEntries/CustomEntry[1] in file
C:\powershell6\Modules\PowerShellHumanizer\3.1\FileInfo.format.ps1xml: Node CustomItem is missing.
C:\powershell6\Modules\PowerShellHumanizer\3.1\FileInfo.format.ps1xml, Error at XPath
/Configuration/Controls/Control[1]/CustomControl/CustomEntries/CustomEntry[1]/CustomItem in file
C:\powershell6\Modules\PowerShellHumanizer\3.1\FileInfo.format.ps1xml: Frame failed to load.
C:\powershell6\Modules\PowerShellHumanizer\3.1\FileInfo.format.ps1xml, Error at XPath
/Configuration/Controls/Control[1]/CustomControl/CustomEntries/CustomEntry[1]/CustomItem/Frame[1] in file
C:\powershell6\Modules\PowerShellHumanizer\3.1\FileInfo.format.ps1xml: Node CustomItem is missing.
C:\powershell6\Modules\PowerShellHumanizer\3.1\FileInfo.format.ps1xml, Error at XPath
/Configuration/Controls/Control[1]/CustomControl/CustomEntries/CustomEntry[1]/CustomItem/Frame[1]/CustomItem in file
C:\powershell6\Modules\PowerShellHumanizer\3.1\FileInfo.format.ps1xml: Text failed to load.
C:\powershell6\Modules\PowerShellHumanizer\3.1\FileInfo.format.ps1xml, Error at XPath
/Configuration/Controls/Control[1]/CustomControl/CustomEntries/CustomEntry[1]/CustomItem/Frame[1]/CustomItem/Text[1]
in file C:\powershell6\Modules\PowerShellHumanizer\3.1\FileInfo.format.ps1xml: The resource FileSystemProviderStrings
in assembly C:\System.Management.Automation is not found.

Environment data

Name                           Value                                                                                   
----                           -----                                                                                   
BuildVersion                   3.0.0.0                                                                                 
GitCommitId                    v6.0.0-alpha.15                                                                         
SerializationVersion           1.1.0.1                                                                                 
CLRVersion                                                                                                             
WSManStackVersion              3.0                                                                                     
PSVersion                      6.0.0-alpha                                                                             
PSRemotingProtocolVersion      2.3                                                                                     
PSEdition                      Core                                                                                    
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                 
@joeyaiello joeyaiello added the WG-Engine core PowerShell engine, interpreter, and runtime label Jan 30, 2017
@joeyaiello joeyaiello added this to the 6.0.0-beta milestone Jan 30, 2017
@joeyaiello
Copy link
Contributor

@Steve had me assign this a 6.0.0-beta milestone to make sure we haven't broken format.ps1xml in 6.0

@SteveL-MSFT SteveL-MSFT modified the milestones: 6.0.0-beta1, 6.0.0-beta2 Mar 16, 2017
@SteveL-MSFT SteveL-MSFT modified the milestones: 6.0.0-beta, 6.0.0 May 15, 2017
@joeyaiello joeyaiello modified the milestones: 6.0.0-HighPriority, 6.0.0 May 15, 2017
@anmenaga anmenaga self-assigned this Jun 26, 2017
@anmenaga
Copy link

Looks like this is a resource addressing problem; Not really related to format.ps1xml.
From WindowsPS to PSCore resource paths have changed like this example:
WindowsPS: FileSystemProviderStrings
PSCore: System.Management.Automation.resources.FileSystemProviderStrings

... and PowerShellHumanizer(v3.1) module uses 'WindowsPS' syntax:
<Text AssemblyName="System.Management.Automation" BaseName="FileSystemProviderStrings" ResourceId="DirectoryDisplayGrouping"/>
, so this resource is not found when module is loaded on PSCore.

Since this blocks some existing modules from running on PSCore, I'll add code to check for alternative resource path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Fixed The issue is fixed. WG-Engine core PowerShell engine, interpreter, and runtime
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
0