Skip to content

Improve .NET version and host OS handling#5571

Open
lisandroct wants to merge 6 commits into
masterfrom
lisandro/address-mac-support-in-net-10
Open

Improve .NET version and host OS handling#5571
lisandroct wants to merge 6 commits into
masterfrom
lisandro/address-mac-support-in-net-10

Conversation

@lisandroct

@lisandroct lisandroct commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Description of Changes

Handle when the host OS and the .NET version selected (automatically or manually) are incompatible:

  • init and dev default to .NET 10 on Windows and Linux.
  • init and dev default to .NET 8 on Mac.
  • If init, dev, generate or publish are called on an incompatible host, it throws an error.
    Compatibility:
  • Windows: Supports .NET 8 JIT, .NET 8 AOT and .NET 10 AOT
  • Linux: Supports .NET 8 JIT and .NET 10 AOT
  • Mac: Supports .NET 8 JIT

This PR also fixes a bug where C# modules targeting .NET 8 and NativeAOT would end up with duplicated <PackageReference> in .csproj.

API and ABI breaking changes

No breaking changes.

Expected complexity level and risk

  1. It just improves how we handle the host and the .net version and throw errors accordingly.

Testing

  • Test are passing

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant