Description
We moved PowerShell to use the latest .NET SDK 11.0.100-preview.7 and that broke the PowerShell build on Linux and macOS. Build on Windows is fine.
Here are the CI runs
Linux -- Ubuntu 24.04: 27828/merge - 6179 · PowerShell/PowerShell@623e11d
macOS -- 15.7.7: 27828/merge - 6136 · PowerShell/PowerShell@623e11d
The build failure output:
/usr/share/dotnet/sdk/11.0.100-preview.7.26381.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.CrossGen.targets(501,5): error : Error: Failed to load assembly 'System.Formats.Nrbf' [/home/runner/work/PowerShell/PowerShell/src/powershell-unix/powershell-unix.csproj]
/usr/share/dotnet/sdk/11.0.100-preview.7.26381.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.CrossGen.targets(501,5): error : Internal.TypeSystem.TypeSystemException+FileNotFoundException: Failed to load assembly 'System.Formats.Nrbf' [/home/runner/work/PowerShell/PowerShell/src/powershell-unix/powershell-unix.csproj]
/usr/share/dotnet/sdk/11.0.100-preview.7.26381.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.CrossGen.targets(501,5): error : at Internal.TypeSystem.ThrowHelper.ThrowFileNotFoundException(ExceptionStringID, String) in /_/src/runtime/src/coreclr/tools/Common/TypeSystem/Common/ThrowHelper.cs:line 41 [/home/runner/work/PowerShell/PowerShell/src/powershell-unix/powershell-unix.csproj]
/usr/share/dotnet/sdk/11.0.100-preview.7.26381.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.CrossGen.targets(501,5): error : at Internal.TypeSystem.ResolutionFailure.Throw() in /_/src/runtime/src/coreclr/tools/Common/TypeSystem/Common/ResolutionFailure.cs:line 105 [/home/runner/work/PowerShell/PowerShell/src/powershell-unix/powershell-unix.csproj]
/usr/share/dotnet/sdk/11.0.100-preview.7.26381.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.CrossGen.targets(501,5): error : at Internal.TypeSystem.Ecma.EcmaModule.GetObject(EntityHandle, NotFoundBehavior) in /_/src/runtime/src/coreclr/tools/Common/TypeSystem/Ecma/EcmaModule.cs:line 527 [/home/runner/work/PowerShell/PowerShell/src/powershell-unix/powershell-unix.csproj]
/usr/share/dotnet/sdk/11.0.100-preview.7.26381.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.CrossGen.targets(501,5): error : at Internal.TypeSystem.Ecma.EcmaSignatureParser.ResolveHandle(EntityHandle) in /_/src/runtime/src/coreclr/tools/Common/TypeSystem/Ecma/EcmaSignatureParser.cs:line 61 [/home/runner/work/PowerShell/PowerShell/src/powershell-unix/powershell-unix.csproj]
/usr/share/dotnet/sdk/11.0.100-preview.7.26381.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.CrossGen.targets(501,5): error : at Internal.TypeSystem.Ecma.EcmaSignatureParser.ParseTypeImpl(SignatureTypeCode) in /_/src/runtime/src/coreclr/tools/Common/TypeSystem/Ecma/EcmaSignatureParser.cs:line 256 [/home/runner/work/PowerShell/PowerShell/src/powershell-unix/powershell-unix.csproj]
/usr/share/dotnet/sdk/11.0.100-preview.7.26381.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.CrossGen.targets(501,5): error : at Internal.TypeSystem.Ecma.EcmaSignatureParser.ParseMethodSignatureImpl(Boolean) in /_/src/runtime/src/coreclr/tools/Common/TypeSystem/Ecma/EcmaSignatureParser.cs:line 403 [/home/runner/work/PowerShell/PowerShell/src/powershell-unix/powershell-unix.csproj]
/usr/share/dotnet/sdk/11.0.100-preview.7.26381.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.CrossGen.targets(501,5): error : at Internal.TypeSystem.Ecma.EcmaSignatureParser.ParseMethodSignature() in /_/src/runtime/src/coreclr/tools/Common/TypeSystem/Ecma/EcmaSignatureParser.cs:line 337 [/home/runner/work/PowerShell/PowerShell/src/powershell-unix/powershell-unix.csproj]
/usr/share/dotnet/sdk/11.0.100-preview.7.26381.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.CrossGen.targets(501,5): error : at Internal.TypeSystem.Ecma.EcmaMethod.InitializeSignature() in /_/src/runtime/src/coreclr/tools/Common/TypeSystem/Ecma/EcmaMethod.cs:line 88 [/home/runner/work/PowerShell/PowerShell/src/powershell-unix/powershell-unix.csproj]
/usr/share/dotnet/sdk/11.0.100-preview.7.26381.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.CrossGen.targets(501,5): error : at ILCompiler.DependencyAnalysis.ReadyToRun.InheritedVirtualMethodsNode.GetConditionalStaticDependencies(NodeFactory) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/InheritedVirtualMethodsNode.cs:line 91 [/home/runner/work/PowerShell/PowerShell/src/powershell-unix/powershell-unix.csproj]
/usr/share/dotnet/sdk/11.0.100-preview.7.26381.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.CrossGen.targets(501,5): error : at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.GetStaticDependenciesImpl(DependencyNodeCore`1) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs:line 194 [/home/runner/work/PowerShell/PowerShell/src/powershell-unix/powershell-unix.csproj]
/usr/share/dotnet/sdk/11.0.100-preview.7.26381.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.CrossGen.targets(501,5): error : at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ProcessMarkStack() in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs:line 261 [/home/runner/work/PowerShell/PowerShell/src/powershell-unix/powershell-unix.csproj]
/usr/share/dotnet/sdk/11.0.100-preview.7.26381.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.CrossGen.targets(501,5): error : at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ComputeMarkedNodes() in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs:line 309 [/home/runner/work/PowerShell/PowerShell/src/powershell-unix/powershell-unix.csproj]
/usr/share/dotnet/sdk/11.0.100-preview.7.26381.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.CrossGen.targets(501,5): error : at ILCompiler.ReadyToRunCodegenCompilation.Compile(String) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCodegenCompilation.cs:line 402 [/home/runner/work/PowerShell/PowerShell/src/powershell-unix/powershell-unix.csproj]
/usr/share/dotnet/sdk/11.0.100-preview.7.26381.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.CrossGen.targets(501,5): error : at ILCompiler.Program.RunSingleCompilation(Dictionary`2, InstructionSetSupport, String, Dictionary`2, HashSet`1, ReadyToRunCompilerContext, Logger) in /_/src/runtime/src/coreclr/tools/aot/crossgen2/Program.cs:line 693 [/home/runner/work/PowerShell/PowerShell/src/powershell-unix/powershell-unix.csproj]
/usr/share/dotnet/sdk/11.0.100-preview.7.26381.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.CrossGen.targets(501,5): error : at ILCompiler.Program.Run() in /_/src/runtime/src/coreclr/tools/aot/crossgen2/Program.cs:line 314 [/home/runner/work/PowerShell/PowerShell/src/powershell-unix/powershell-unix.csproj]
/usr/share/dotnet/sdk/11.0.100-preview.7.26381.103/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.CrossGen.targets(501,5): error : at ILCompiler.Crossgen2RootCommand.<>c__DisplayClass216_0.<.ctor>b__0(ParseResult) in /_/src/runtime/src/coreclr/tools/aot/crossgen2/Crossgen2RootCommand.cs:line 275 [/home/runner/work/PowerShell/PowerShell/src/powershell-unix/powershell-unix.csproj]
Reproduction Steps
Building PowerShell on Linux (e.g. Ubuntu 24.04) and macOS (e.g. 15.7.7).
The _CreateR2RImages step will take forever and eventually timed out (cancelled by ctrl+c) with the error output shared above.
Expected behavior
PowerShell build successfully with the _CreateR2RImages step finishes within 30 seconds or so. That's the behavior before us moving to .NET 11 preview.7.
Actual behavior
_CreateR2RImages takes forever and eventually fails.
Regression?
Yes, a regression to .NET 11 preview.6 and prior versions of SDK.
Known Workarounds
None.
Configuration
No response
Other information
No response
Description
We moved PowerShell to use the latest .NET SDK 11.0.100-preview.7 and that broke the PowerShell build on Linux and macOS. Build on Windows is fine.
Here are the CI runs
Linux -- Ubuntu 24.04: 27828/merge - 6179 · PowerShell/PowerShell@623e11d
macOS -- 15.7.7: 27828/merge - 6136 · PowerShell/PowerShell@623e11d
The build failure output:
Reproduction Steps
Building PowerShell on Linux (e.g. Ubuntu 24.04) and macOS (e.g. 15.7.7).
The
_CreateR2RImagesstep will take forever and eventually timed out (cancelled byctrl+c) with the error output shared above.Expected behavior
PowerShell build successfully with the
_CreateR2RImagesstep finishes within 30 seconds or so. That's the behavior before us moving to .NET 11 preview.7.Actual behavior
_CreateR2RImagestakes forever and eventually fails.Regression?
Yes, a regression to .NET 11 preview.6 and prior versions of SDK.
Known Workarounds
None.
Configuration
No response
Other information
No response