-
Notifications
You must be signed in to change notification settings - Fork 135
Add .NET 10 (preview) as the default TFM and enable multi-targeting builds #949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: aaronpowell <[email protected]>
|
@copilot can you make the default TFM .NET 10 and also ensure any GitHub Actions that install .NET are installing .NET 10 as well |
…ET 10 Co-authored-by: aaronpowell <[email protected]>
Done! I've made the following changes in commit 303a76f:
All examples, tests, and the default build now use .NET 10 as the primary framework. |
|
@copilot can you also ensure the devcontainer will install .NET 10 as preview |
Co-authored-by: aaronpowell <[email protected]>
Done! Updated the devcontainer configuration in commit c6b19fc:
The devcontainer will now install .NET 10 preview as the primary SDK with .NET 8 and 9 as additional versions. |
|
@copilot missed one place to install .NET 10 - the |
Co-authored-by: aaronpowell <[email protected]>
… but the MassTransit.ActiveMQ package isn't updated yet Tracked: MassTransit/MassTransit#6133
…ss ambiguous referencing
I feel dirty doing that...
f10b449 to
f3ff1ff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds .NET 10 (preview) as the default target framework moniker (TFM) and enables multi-targeting for .NET 8.0, 9.0, and 10.0 across all source projects in the .NET Aspire Community Toolkit.
Key Changes:
- Updated
DefaultTargetFrameworkfromnet8.0tonet10.0in build configuration - Configured multi-targeting to
net10.0;net8.0;net9.0for all source projects - Updated all CI/CD workflows, composite actions, and development environment to support .NET 10 SDK
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| Directory.Build.props | Changed default TFM to net10.0, enabled multi-targeting for net10.0/net8.0/net9.0, updated DotNetExtensionsVersion to 10.0 RC, added NuGet audit suppression |
| Directory.Packages.props | Consolidated package versions to use DotNetExtensionsVersion variable, removed .NET 9 overrides section, added System.Linq packages for KurrentDB support |
| global.json | Enabled prerelease SDK support for .NET 10 |
| src/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects/CommunityToolkit.Aspire.Hosting.SqlDatabaseProjects.csproj | Extended Aspire issue #7779 workaround condition to include net10.0 |
| src/CommunityToolkit.Aspire.Hosting.SqlServer.Extensions/CommunityToolkit.Aspire.Hosting.SqlServer.Extensions.csproj | Extended Aspire issue #7779 workaround condition to include net10.0 |
| src/CommunityToolkit.Aspire.KurrentDB/CommunityToolkit.Aspire.KurrentDB.csproj | Added conditional System.Linq.AsyncEnumerable reference for net8.0/net9.0 |
| src/CommunityToolkit.Aspire.Hosting.KurrentDB/CommunityToolkit.Aspire.Hosting.KurrentDB.csproj | Added conditional System.Linq.AsyncEnumerable reference for net8.0/net9.0 |
| tests/CommunityToolkit.Aspire.KurrentDB.Tests/CommunityToolkit.Aspire.KurrentDB.Tests.csproj | Added conditional System.Linq.AsyncEnumerable reference for net8.0/net9.0 |
| tests/CommunityToolkit.Aspire.Testing/ConformanceTests.cs | Added guard to skip test when no log categories are specified |
| tests/CommunityToolkit.Aspire.SurrealDb.Tests/ConformanceTests.cs | Added CanCreateClientWithoutConnectingToServer property override, fixed whitespace formatting |
| tests-app-hosts/Ollama.AppHost/Ollama.AppHost.csproj | Updated explicit TargetFramework to net10.0 |
| examples/powershell/CommunityToolkit.Aspire.PowerShell.AppHost/CommunityToolkit.Aspire.PowerShell.AppHost.csproj | Removed redundant TargetFramework, ImplicitUsings, and Nullable properties to inherit from Directory.Build.props |
| examples/masstransit-rabbitmq/CommunityToolkit.Aspire.MassTransit.RabbitMQ.Publisher/CommunityToolkit.Aspire.MassTransit.RabbitMQ.Publisher.csproj | Removed redundant properties to inherit from Directory.Build.props |
| examples/masstransit-rabbitmq/CommunityToolkit.Aspire.MassTransit.RabbitMQ.MessageTypes/CommunityToolkit.Aspire.MassTransit.RabbitMQ.MessageTypes.csproj | Removed redundant properties to inherit from Directory.Build.props |
| .github/workflows/dotnet-main.yml | Changed DEFAULT_DOTNET_VERSION from 8.0.x to 10.0.x |
| .github/workflows/dotnet-release.yml | Changed DEFAULT_DOTNET_VERSION from 8.0.x to 10.0.x |
| .github/workflows/codeql.yml | Added 10.0.x to dotnet-version list |
| .github/workflows/package.yml | Added 10.0.x to dotnet-version list |
| .github/workflows/generate-api-diffs.yml | Added 10.0.x to dotnet-version list, updated build target from net8.0 to net10.0 |
| .github/actions/setup-runtimes-caching/action.yml | Added 10.0.x to dotnet-version list, replaced linux-dev-certs tool with dotnet dev-certs |
| .devcontainer/devcontainer.json | Updated primary .NET version to 10.0, added installUsingApt:false configuration |
| .devcontainer/post-create.sh | Replaced linux-dev-certs tool with dotnet dev-certs |
| <PropertyGroup> | ||
| <OutputType>Exe</OutputType> | ||
| <TargetFramework>net8.0</TargetFramework> | ||
| <TargetFramework>net10.0</TargetFramework> |
Copilot
AI
Nov 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The explicit TargetFramework setting here is inconsistent with the approach used in other AppHost projects. Most example AppHost projects (e.g., examples/powershell/CommunityToolkit.Aspire.PowerShell.AppHost) have removed explicit TargetFramework settings to inherit from Directory.Build.props. Consider removing this line to maintain consistency and allow the framework to be inherited from DefaultTargetFramework.
| <TargetFramework>net10.0</TargetFramework> |
| <ImplicitUsings>enable</ImplicitUsings> | ||
| <Nullable>enable</Nullable> |
Copilot
AI
Nov 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the pattern used in other AppHost projects, consider removing the explicit ImplicitUsings and Nullable properties as they are already set in Directory.Build.props (lines 11-12) and will be inherited automatically.
| <ImplicitUsings>enable</ImplicitUsings> | |
| <Nullable>enable</Nullable> |
| <PackageVersion Include="Microsoft.Extensions.Options" Version="9.0.10" /> | ||
|
|
||
| <ItemGroup Label="System"> | ||
| <PackageVersion Include="System.Linq.Async" Version="6.0.1" /> |
Copilot
AI
Nov 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new "System" ItemGroup label lacks context for why System.Linq.Async has ExcludeAssets set to all while System.Linq.AsyncEnumerable is conditionally included in specific projects. Consider adding a comment explaining that System.Linq.Async is excluded here to avoid transitive dependencies, and that System.Linq.AsyncEnumerable is conditionally referenced for .NET 8.0/9.0 only as the functionality is built-in to .NET 10.
| <PackageVersion Include="System.Linq.Async" Version="6.0.1" /> | |
| <!-- | |
| System.Linq.Async is referenced with ExcludeAssets="all" to avoid introducing transitive dependencies. | |
| System.Linq.AsyncEnumerable is conditionally referenced for .NET 8.0/9.0 only, as the functionality is built-in to .NET 10. | |
| --> | |
| <PackageVersion Include="System.Linq.Async" Version="6.0.1" ExcludeAssets="all" /> |
Closes #
Adds
net10.0as the default target framework moniker (TFM) and enables multi-targeting for .NET 8.0, 9.0, and 10.0 (preview) across all source projects.Changes Made
Build Configuration
DefaultTargetFrameworkfromnet8.0tonet10.0AllTargetFrameworkstonet10.0;net8.0;net9.0.NET 10 Overridessection using 9.0.10 package versions for compatibility during preview phaseallowPrerelease: true)SqlDatabaseProjectsandSqlServer.Extensionsprojects (Aspire issue #7779 workaround)GitHub Actions Workflows
Updated all workflows and composite actions to install and support .NET 10:
DEFAULT_DOTNET_VERSIONto10.0.x10.0.xto dotnet-version listsnet8.0tonet10.010.0.xto dotnet-version list in the composite actionDevelopment Environment
Impact
src/projects multi-target tonet10.0,net8.0, andnet9.0PR Checklist
Other information
This change enables .NET 10 preview as the default framework. The repository now requires .NET 10 SDK (preview) for building. All CI/CD workflows, composite actions, and the development environment (devcontainer) have been updated to install .NET 10 preview alongside .NET 8 and 9 for multi-targeting support.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.