Skip to content

feat!: upgrade to .net 11 - #217

Open
OptimusPi wants to merge 10 commits into
elringus:mainfrom
OptimusPi:net11
Open

OptimusPi wants to merge 10 commits into
elringus:mainfrom
OptimusPi:net11

Conversation

@OptimusPi

@OptimusPi OptimusPi commented Nov 29, 2026 •

Copy link
Copy Markdown

Bumps core projects, tests, samples, and docs from net10.0/net6.0 to net11.0. Keeps the Roslyn source generator on netstandard2.0.

Verified locally: dotnet build src/cs/Bootsharp.sln -c Release succeeds on .NET 11 SDK 11.0.100 (0 errors; 2 pre-existing NU1510 warnings in Bootsharp.Inject).

WASM/AOT caveat: this TFM bump alone does not make a full WASM publish work on .NET 11. The bundled NativeAOT-LLVM/ILCompiler in Bootsharp 0.9.0 is still .NET 10-based (src/cs/.scripts/llvm.sh pins 10.0.0-rc.1.26117.1), and publishing a net11.0 consumer fails with a System.Private.CoreLib.dll override error plus a missing PrepareForILLink target. This PR is the TFM-alignment part; a net11-compatible compiler/runtime package is still needed for WASM/AOT.

Bump core projects, tests, samples, and docs from net10.0/net6.0 to net11.0. Keep netstandard2.0 generator target unchanged.
@elringus

Copy link
Copy Markdown
Owner

Hey, thanks for the PR. Can you please clarify the reason to bump the .net version in the libraries? Are there any issues with using Bootsharp under .net 11?

@OptimusPi

Copy link
Copy Markdown
Author

Update on why this matters: building the library TFMs on .NET 11 works, but publishing a Bootsharp WASM/AOT app on SDK 11.0.100 does not with the current 0.9.0 package. With a consumer targeting net11.0 I get:

  1. error : Overriding System.Private.CoreLib.dll with a newer version is not supported. Attempted to use ...Microsoft.NETCore.App.Runtime.browser-wasm\11.0.0\...\System.Private.CoreLib.dll instead of ...bootsharp\0.9.0\llvm\runtime.browser-wasm.microsoft.dotnet.ilcompiler.llvm\...\native-hidden\System.Private.CoreLib.dll
  2. error MSB4057: The target "PrepareForILLink" does not exist in the project.

The Debug/CoreCLR WASM path also fails on .NET 11 with $(MicrosoftNetCoreAppRuntimePackDir)='' ....

Root cause looks like the bundled NativeAOT-LLVM/ILCompiler in Bootsharp 0.9.0 is still .NET 10-based (src/cs/.scripts/llvm.sh pins 10.0.0-rc.1.26117.1), so a TFM-only bump isn't sufficient for WASM/AOT. This PR is still valid for net11.0 library support, but WASM publish needs a net11-compatible compiler/runtime (and SDK 11 target integration). Happy to help update the bundled compiler once there is a compatible package/feed, or split the TFM-only part if preferred.

@OptimusPi OptimusPi changed the title Target .NET 11 across Bootsharp Target .NET 11 TFMs (WASM AOT needs net11 compiler) Nov 30, 2026
@codecov

codecov Bot commented Nov 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (35ae2a9) to head (d680afd).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #217   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           60        60           
  Lines         2991      2989    -2     
  Branches       545       544    -1     
=========================================
- Hits          2991      2989    -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@elringus elringus changed the title Target .NET 11 TFMs (WASM AOT needs net11 compiler) feat!: upgrade to .net 11 Nov 30, 2026
@elringus

Copy link
Copy Markdown
Owner

Ok, debug/mono publishing works, but we are blocked by NativeAOT-LLVM -- they do not support .NET 11 yet. It looks like there was an ongoing work on that, but they abandoned it: dotnet/runtimelab#3261

Will keep this PR open until they unblock us.

@elringus elringus added the enhancement New feature or enhancement label Nov 30, 2026
@OptimusPi

Copy link
Copy Markdown
Author

I am working on it because .NET 11 is dope, I lost employment and I am bored 🥱

And I am using LLVM branch and working through issues for Bootsharp and the sponsor package FileSystem

I also am hoping to build on macOS M1

Bootsharp works great on .net 10

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants