You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a regression between build 8.0.100-preview.5.23267.7 and 8.0.100-preview.5.23269.4. It was discovered when attempting to update the .NET Docker images to the latest build of Preview 5. You can see the CI results with this error here: dotnet/dotnet-docker#4628
Process terminated. The type initializer for 'System.Management.Automation.PSVersionInfo' threw an exception. at System.Environment.FailFast(System.String, System.Exception) at Microsoft.PowerShell.UnmanagedPSEntry.Start(System.String[], Int32) at Microsoft.PowerShell.ManagedPSEntry.Main(System.String[])System.TypeInitializationException: The type initializer for 'System.Management.Automation.PSVersionInfo' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.Management.Automation.PSObject' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.File name: 'Microsoft.Management.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' at System.Management.Automation.PSObject..cctor() --- End of inner exception stack trace --- at System.Management.Automation.PSObject.get_Properties() at System.Management.Automation.SemanticVersion.op_Implicit(SemanticVersion semver) at System.Management.Automation.PSVersionInfo..cctor() --- End of inner exception stack trace --- at System.Management.Automation.PSVersionInfo.get_PSVersion() at System.Management.Automation.PSSnapInReader.ReadRegistryInfo(Version& assemblyVersion, String& publicKeyToken, String& culture, String& applicationBase, Version& psVersion) at System.Management.Automation.PSSnapInReader.ReadCoreEngineSnapIn() at System.Management.Automation.Runspaces.InitialSessionState.ImportCorePSSnapIn() at System.Management.Automation.Runspaces.InitialSessionState.CreateDefault2() at Microsoft.PowerShell.UnmanagedPSEntry.Start(String[] args, Int32 argc)The command 'cmd /S /C pwsh --version' returned a non-zero code: 2148734499
### Error details
_No response_
### Environment data
```powershell
Can't run it because pwsh fails to run.
Prerequisites
Steps to reproduce
This is a regression between build 8.0.100-preview.5.23267.7 and 8.0.100-preview.5.23269.4. It was discovered when attempting to update the .NET Docker images to the latest build of Preview 5. You can see the CI results with this error here: dotnet/dotnet-docker#4628
This affects Windows only.
Build this Dockerfile:
Expected behavior
It should be able to run `pwsh` without failure.Actual behavior
Visuals
No response