Repository navigation
chore: Update to .NET 11 Preview 7 - #24054
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the repository’s .NET 11 preview pins to Preview 7 across SDK selection, package version overrides, and CI variables to keep the build matrix aligned with the latest .NET 11 preview tooling.
Changes:
- Bump .NET 11 Preview package/version overrides (including reference assemblies used by source generator tests).
- Update
build/ci/net11/_global.jsonto the .NET 11 Preview 7 SDK. - Update Azure DevOps pipeline variables to use the updated .NET SDK and UnoCheck version.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/Uno.Sdk/packages.json | Updates net11.0 package version overrides to .NET 11 Preview 7 builds. |
| src/SourceGenerators/Uno.UI.SourceGenerators.Tests/_Dotnet.cs | Updates reference assembly package versions for net11.0 / net11.0-android test compilation. |
| src/Directory.Build.targets | Updates net11.0 Microsoft.Win32.SystemEvents package pin to Preview 7. |
| build/ci/net11/_global.json | Updates the pinned .NET 11 Preview SDK version used for CI/local sanity checks. |
| .vsts-ci.yml | Updates CI variables for .NET 11 Preview SDK and UnoCheck version. |
| .vsts-ci-docs.yml | Updates docs CI variables for .NET 11 Preview SDK and UnoCheck version. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24054/wasm-skia-net9/index.html |
|
|
f03e487 to
446e5a9
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24054/wasm-skia-net9/index.html |
446e5a9 to
c193f8b
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24054/wasm-skia-net9/index.html |
|
|
Context: #22745 Context: dotnet/android#12356 Update version numbers accordingly. To sanity-check locally, try: \cp build/ci/net11/_global.json global.json dotnet build -f net11.0-ios26.5 src/Uno.Foundation/Uno.Foundation.netcoremobile.csproj dotnet build -f net11.0 src/Uno.UI/Uno.UI.csproj dotnet publish -f net11.0-android src/SamplesApp/SamplesApp.Skia.netcoremobile/SamplesApp.Skia.netcoremobile.csproj -p:UnoTargetFrameworkOverride=net11.0-android -p:UNO_DISABLE_ANALYZERS_IN_SAMPLES=true -bl dotnet build -f net11.0-ios -c Release -p:UnoTargetFrameworkOverride=net11.0-ios -bl src/SamplesApp/SamplesApp.Skia.netcoremobile/SamplesApp.Skia.netcoremobile.csproj # Android+NativeAOT dotnet publish -f net11.0-android src/SamplesApp/SamplesApp/SamplesApp.csproj -r android-arm64 -p:UnoTargetFrameworkOverride=net11.0-android -p:ApplicationId=uno.platform.samplesapp.skia.nativeaot -p:SkiaPublishAot=true -p:SkiaSharpVersion=4.151.1 -bl Note: Android+NativeAOT build fails by default, due to a bug in .NET 11 Preview 7: % dotnet publish src/SamplesApp/SamplesApp/SamplesApp.csproj -r android-arm64 -f net11.0-android -p:UnoTargetFrameworkOverride=net11.0-android -p:ApplicationId=uno.platform.samplesapp.skia.nativeaot -p:SkiaPublishAot=true -p:SkiaSharpVersion=4.151.1 -bl …/uno/src/SamplesApp/SamplesApp/SamplesApp.csproj : error NU1603: Warning As Error: SamplesApp depends on Microsoft.DotNet.ILCompiler (>= 11.0.0-preview.7.26378.119) but Microsoft.DotNet.ILCompiler 11.0.0-preview.7.26378.119 was not found. Microsoft.DotNet.ILCompiler 11.0.0-preview.7.26381.103 was resolved instead. …/uno/src/SamplesApp/SamplesApp/SamplesApp.csproj : error NU1102: Unable to find package Microsoft.NETCore.App.Runtime.NativeAOT.android-arm64 with version (= 11.0.0-preview.7.26378.119) - Found 21 version(s) in NuGet official package source [ Nearest version: 11.0.0-preview.7.26381.103 ] - Found 0 version(s) in Solution Packages - Found 0 version(s) in …/dotnet-sdk-11.0.100-preview.7.26381.103/library-packs …/uno/src/SamplesApp/SamplesApp/SamplesApp.csproj : error NU1102: Unable to find package Microsoft.NETCore.App.Runtime.NativeAOT.android-x64 with version (= 11.0.0-preview.7.26378.119) - Found 21 version(s) in NuGet official package source [ Nearest version: 11.0.0-preview.7.26381.103 ] - Found 0 version(s) in Solution Packages - Found 0 version(s) in …/dotnet-sdk-11.0.100-preview.7.26381.103/library-packs …/uno/src/SamplesApp/SamplesApp/SamplesApp.csproj : error NU1102: Unable to find package runtime.osx-arm64.Microsoft.DotNet.ILCompiler with version (= 11.0.0-preview.7.26378.119) - Found 96 version(s) in NuGet official package source [ Nearest version: 11.0.0-preview.7.26381.103 ] - Found 0 version(s) in Solution Packages - Found 0 version(s) in …/dotnet-sdk-11.0.100-preview.7.26381.103/library-packs Update `Uno.CrossTargetting.targets` to contain a workaround; this should not be needed in the next .NET 11 release.
Context/Duplicates: #24050 Context: #24036 (`.pdb` files are hard, mkay?) After "chore: Update to .NET 11 Preview 7", the **Tests - Android+NativeAOT Skia > … > Build Android+NativeAOT Skia Head** step started failing: /home/AzDevOps/.nuget/packages/microsoft.dotnet.ilcompiler/11.0.0-preview.7.26381.103/build/Microsoft.NETCore.Native.targets(359,5): error MSB3073: The command ""/home/AzDevOps/.nuget/packages/runtime.linux-x64.microsoft.dotnet.ilcompiler/11.0.0-preview.7.26381.103/tools/ilc" @"obj/Release/net11.0-android/android-x64/native/SamplesApp.ilc.rsp"" exited with code 1. [/agent/_work/1/s/src/SamplesApp/SamplesApp/SamplesApp.csproj::TargetFramework=net11.0-android] EXEC : error : Invalid compressed integer. [/agent/_work/1/s/src/SamplesApp/SamplesApp/SamplesApp.csproj::TargetFramework=net11.0-android] System.BadImageFormatException: Invalid compressed integer. at System.Reflection.Throw.InvalidCompressedInteger() in /_/src/runtime/src/libraries/System.Reflection.Metadata/src/System/Reflection/Throw.cs:line 179 at System.Reflection.Metadata.SequencePointCollection.Enumerator.MoveNext() in /_/src/runtime/src/libraries/System.Reflection.Metadata/src/System/Reflection/Metadata/PortablePdb/SequencePointCollection.cs:line 67 at Internal.TypeSystem.Ecma.PortablePdbSymbolReader.<GetSequencePointsForMethod>d__10.MoveNext() in /_/src/runtime/src/coreclr/tools/Common/TypeSystem/Ecma/SymbolReader/PortablePdbSymbolReader.cs:line 147 at ILCompiler.Logging.MessageOrigin..ctor(MethodIL, Int32) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Logging/MessageOrigin.cs:line 65 at ILCompiler.Dataflow.ReflectionMethodBodyScanner.HandleGetField(MethodIL, Int32, FieldDesc) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/ReflectionMethodBodyScanner.cs:line 230 at ILCompiler.Dataflow.MethodBodyScanner.ScanStfld(MethodIL, Int32, ILOpcode, FieldDesc, Stack`1, Nullable`1[], InterproceduralState&) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/MethodBodyScanner.cs:line 1151 at ILCompiler.Dataflow.MethodBodyScanner.Scan(MethodIL, InterproceduralState&) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/MethodBodyScanner.cs:line 673 at ILCompiler.Dataflow.MethodBodyScanner.InterproceduralScan(MethodIL) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/MethodBodyScanner.cs:line 311 at ILCompiler.Dataflow.ReflectionMethodBodyScanner.InterproceduralScan(MethodIL) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/ReflectionMethodBodyScanner.cs:line 117 at ILCompiler.Dataflow.ReflectionMethodBodyScanner.ScanAndProcessReturnValue(NodeFactory, FlowAnnotations, Logger, MethodIL, List`1&) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/Dataflow/ReflectionMethodBodyScanner.cs:line 137 at ILCompiler.DependencyAnalysis.DataflowAnalyzedMethodNode.GetStaticDependencies(NodeFactory) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/DependencyAnalysis/DataflowAnalyzedMethodNode.cs:line 33 at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.GetStaticDependenciesImpl(DependencyNodeCore`1) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs:line 184 at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ProcessMarkStack() in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs:line 261 at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ComputeMarkedNodes() in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.DependencyAnalysisFramework/DependencyAnalyzer.cs:line 309 at ILCompiler.ILScanner.ILCompiler.IILScanner.Scan() in /_/src/runtime/src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/ILScanner.cs:line 157 at ILCompiler.Program.<Run>g__RunScanner|4_0(Program.<>c__DisplayClass4_0&) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler/Program.cs:line 525 at ILCompiler.Program.Run() in /_/src/runtime/src/coreclr/tools/aot/ILCompiler/Program.cs:line 594 at ILCompiler.ILCompilerRootCommand.<>c__DisplayClass263_0.<.ctor>b__0(ParseResult) in /_/src/runtime/src/coreclr/tools/aot/ILCompiler/ILCompilerRootCommand.cs:line 319 /home/AzDevOps/.nuget/packages/microsoft.dotnet.ilcompiler/11.0.0-preview.7.26381.103/build/Microsoft.NETCore.Native.targets(359,5): error MSB3073: The command ""/home/AzDevOps/.nuget/packages/runtime.linux-x64.microsoft.dotnet.ilcompiler/11.0.0-preview.7.26381.103/tools/ilc" @"obj/Release/net11.0-android/android-arm64/native/SamplesApp.ilc.rsp"" exited with code 1. [/agent/_work/1/s/src/SamplesApp/SamplesApp/SamplesApp.csproj::TargetFramework=net11.0-android] We've seen this before! See #24050 for (many!) more details. The TL;DR is that older versions of Mono.Cecil could create "broken" `.pdb` files, which would produce `BadImageFormatException` errors such as the above when processed by `ilc`. *Part* of the fix is to update to a version of Mono.Cecil which fixes this issue: Mono.Cecil 0.11.6. (A similar issue *also* impacts illink, but simply updating Mono.Cecil within Uno appears to be enough to fix the above error.)
c193f8b to
c8242cc
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-24054/wasm-skia-net9/index.html |
|
Tick the box to add this pull request to the merge queue (same as
|
The Android runtime-test script launched the app with a hardcoded Java Callable Wrapper name, `crc6448f3b0362cbf4bc9.MainActivity`. That name is generated by the Android toolchain and is not stable. Since the update to .NET 11 Preview 7 (#24054) the NativeAOT build emits its wrappers through the typemap as `scrc64<hash>` rather than `crc64<hash>`, and with a different hash. Comparing the generated stubs across the last green and first red builds of `Tests - Android+NativeAOT Skia`: 40c4a89 (green): typemap/java/crc6448f3b0362cbf4bc9/MainActivity.java c2831a9 (red): typemap/java/scrc6415f86cac20992436/MainActivity.java so `am start` failed with "Activity class {...} does not exist", the app never ran, no TestResult XML was produced, and the stage failed on all five attempts. Resolve the launcher activity from the installed package instead. This covers both wrapper schemes, absorbs the hash changing when an activity's namespace or assembly moves (as when the SamplesApp heads are consolidated), and fails fast with a clear message instead of timing out and reporting "did nunit crash?". Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Xn8SQpybcpmMCwFmbCzSWt
The Android runtime-test script launched the app with a hardcoded Java Callable Wrapper name, `crc6448f3b0362cbf4bc9.MainActivity`. That name is generated by the Android toolchain and is not stable. Since the update to .NET 11 Preview 7 (#24054) the NativeAOT build emits its wrappers through the typemap as `scrc64<hash>` rather than `crc64<hash>`, and with a different hash. Comparing the generated stubs across the last green and first red builds of `Tests - Android+NativeAOT Skia`: 40c4a89 (green): typemap/java/crc6448f3b0362cbf4bc9/MainActivity.java c2831a9 (red): typemap/java/scrc6415f86cac20992436/MainActivity.java so `am start` failed with "Activity class {...} does not exist", the app never ran, no TestResult XML was produced, and the stage failed on all five attempts. Resolve the launcher activity from the installed package instead. This covers both wrapper schemes, absorbs the hash changing when an activity's namespace or assembly moves (as when the SamplesApp heads are consolidated), and fails fast with a clear message instead of timing out and reporting "did nunit crash?". Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Xn8SQpybcpmMCwFmbCzSWt
The Android runtime-test script launched the app with a hardcoded Java Callable Wrapper name, `crc6448f3b0362cbf4bc9.MainActivity`. That name is generated by the Android toolchain and is not stable. Since the update to .NET 11 Preview 7 (#24054) the NativeAOT build emits its wrappers through the typemap as `scrc64<hash>` rather than `crc64<hash>`, and with a different hash. Comparing the generated stubs across the last green and first red builds of `Tests - Android+NativeAOT Skia`: 40c4a89 (green): typemap/java/crc6448f3b0362cbf4bc9/MainActivity.java c2831a9 (red): typemap/java/scrc6415f86cac20992436/MainActivity.java so `am start` failed with "Activity class {...} does not exist", the app never ran, no TestResult XML was produced, and the stage failed on all five attempts. Resolve the launcher activity from the installed package instead. This covers both wrapper schemes, absorbs the hash changing when an activity's namespace or assembly moves (as when the SamplesApp heads are consolidated), and fails fast with a clear message instead of timing out and reporting "did nunit crash?". Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Xn8SQpybcpmMCwFmbCzSWt
Context: #22745
Update version numbers accordingly.
To sanity-check locally, try:
PR Type:
✨ Feature
🏗️ Build or CI related changes
What changed? 🚀
PR Checklist ✅
Screenshots Compare Test Runresults.