chore: Add support for .NET 10 target framework
This PR intended to add support for .NET 10.
- Add target framework
net10.0toTargetFrameworks. (It increase NuGet package size) - Migrate base target framework from
net8.0tonet10.0 - Update GitHub Actions workflow settings
What's Changed in this PR
action.yml
- Update
actions/setup-nodeversion - Update
actions/setup-dotnetversion - Add setting to install .NET 10
ci.yml
- Add
dotnet teststep for .NET 10. - Modify existing
dotnet teststep for .NET 8 run on ubuntu only. - Modify Percy test step to use .NET 10
- Modify Snapshot test steps to use .NET 10
lint.yml
- Remove unused
actions/setup-dotnetstep.
release.yml
- Change Self-contained package .NET version to .NET 10.
- Modify
actions/setup-dotnetsettings to install .NET 10 - Update
Sign CLIversion and add comment. (It can'tdotnet nuget signcommand. and required to run on Windows)
nightly.yml
- Remove step
setup-dotnet(.NET 10 SDK is installed bysetup-dotnetstep instead) - Add test step for .NET 9
snapshot.yml
- Update
dotnet testtarget framework to use .NET 10
Directory.Build.Props
- Add
net10.0target framework. (It's expected to increase NuGet package size) - Comment out settings for
DOCFX_PREVIEW_BUILD(It's re-enabled when testing .NET 11) - Remove old comment for NU5104.
Directory.Packages.Props
SymbolFormatter.*.cs
- Update Roslyn packages to
5.0.0 - Note: To support C# 14 feature (e.g. extension members) it need to add code on docfx side.
*.csproj
- Update TargetFramework from net8.0 to net10.0
Any chance to merge this and release yesterday? Thanks. 🙂
This PR intended to support for .NET 10 SDK and Roslyn 5.x. But it's not supporting to generating API metadata that using C# 14 features.
It need to additional tasks to generating HTML site that support for C# 14 features
I see. For some reason, I can't build (SDK resolver issue) Stride docs (https://github.com/stride3d/stride-docs/issues/430) with the latest (or previous) docfx version. I am targeting .NET 10 now and when I use your PR, it works 🙂. I will try docfx custom build with your PR merged temporarily, till this is merged and released 🤷♂️.
Can this be merged and released, then add support for new language features later?
I'm asking because building my codebase on .NET 10 currently doesn't work due to the following errors:
- error CS8652: The feature 'unbound generic types in nameof operator' is currently in Preview and unsupported. To use Preview features, use the 'preview' language version.
- warning: No .NET API detected for .
It's understandable that DocFX can't yet handle the new C# features, such as extension blocks and new conversion operators, because they affect the public API and require code changes that may take some time. This is why I'm postponing such changes in my codebase. So, if DocFX would only update to the latest Roslyn assemblies and release that, my problem would be solved, and I'm no longer blocked from releasing a .NET 10-compatible version.
~Edit: Well, I'm also dependent on #10850.~ It looks like that fix has already been merged.