Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 6, 2025

Closes #

Adds net10.0 as 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

  • Directory.Build.props:
    • Changed DefaultTargetFramework from net8.0 to net10.0
    • Set AllTargetFrameworks to net10.0;net8.0;net9.0
  • Directory.Packages.props: Added .NET 10 Overrides section using 9.0.10 package versions for compatibility during preview phase
  • global.json: Enabled prerelease SDK support (allowPrerelease: true)
  • Project workarounds: Extended existing .NET 9.0 conditions to include 10.0 in SqlDatabaseProjects and SqlServer.Extensions projects (Aspire issue #7779 workaround)

GitHub Actions Workflows

Updated all workflows and composite actions to install and support .NET 10:

  • dotnet-main.yml and dotnet-release.yml: Changed DEFAULT_DOTNET_VERSION to 10.0.x
  • codeql.yml, package.yml, and generate-api-diffs.yml: Added 10.0.x to dotnet-version lists
  • generate-api-diffs.yml: Updated build target from net8.0 to net10.0
  • setup-runtimes-caching/action.yml: Added 10.0.x to dotnet-version list in the composite action

Development Environment

  • devcontainer.json: Updated to install .NET 10 preview as the primary SDK version with .NET 8.0 and 9.0 as additional versions

Impact

  • Default TFM: .NET 10 is now the primary framework (affects examples and tests)
  • Source Projects: All src/ projects multi-target to net10.0, net8.0, and net9.0
  • CI/CD: All GitHub Actions workflows and composite actions now install and build with .NET 10 preview
  • Development Environment: Devcontainer now installs .NET 10 preview as the primary SDK
  • NuGet Packages: Will include binaries for all three target frameworks

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • New integration
    • Docs are written
    • Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

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

Add .NET 10 (currently preview) as a TFM that is used in the multi-targetting builds


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add .NET 10 as a TFM for multi-targeting builds Add .NET 10 (preview) as a TFM for multi-targeting builds Nov 6, 2025
Copilot AI requested a review from aaronpowell November 6, 2025 05:19
Copilot finished work on behalf of aaronpowell November 6, 2025 05:19
@aaronpowell
Copy link
Member

@copilot can you make the default TFM .NET 10 and also ensure any GitHub Actions that install .NET are installing .NET 10 as well

Copy link
Contributor Author

Copilot AI commented Nov 6, 2025

@copilot can you make the default TFM .NET 10 and also ensure any GitHub Actions that install .NET are installing .NET 10 as well

Done! I've made the following changes in commit 303a76f:

  1. Changed default TFM to .NET 10:

    • DefaultTargetFramework is now net10.0
    • AllTargetFrameworks reordered to net10.0;net8.0;net9.0
    • Enabled prerelease SDKs in global.json
  2. Updated GitHub Actions to install .NET 10:

    • dotnet-main.yml and dotnet-release.yml: Changed DEFAULT_DOTNET_VERSION to 10.0.x
    • codeql.yml, package.yml, and generate-api-diffs.yml: Added 10.0.x to the dotnet-version list
    • generate-api-diffs.yml: Updated build target from net8.0 to net10.0

All examples, tests, and the default build now use .NET 10 as the primary framework.

Copilot AI changed the title Add .NET 10 (preview) as a TFM for multi-targeting builds Add .NET 10 (preview) as the default TFM and enable multi-targeting builds Nov 6, 2025
Copilot finished work on behalf of aaronpowell November 6, 2025 05:29
@aaronpowell
Copy link
Member

@copilot can you also ensure the devcontainer will install .NET 10 as preview

Copy link
Contributor Author

Copilot AI commented Nov 6, 2025

@copilot can you also ensure the devcontainer will install .NET 10 as preview

Done! Updated the devcontainer configuration in commit c6b19fc:

  • Changed primary .NET version from 8.0 to 10.0
  • Updated additionalVersions to include 8.0,9.0
  • Added installUsingApt: false to ensure preview versions are installed from Microsoft's feeds

The devcontainer will now install .NET 10 preview as the primary SDK with .NET 8 and 9 as additional versions.

Copilot finished work on behalf of aaronpowell November 6, 2025 05:44
@aaronpowell
Copy link
Member

@copilot missed one place to install .NET 10 - the action.yml in .github/actions/setup-runtimes-caching

Copy link
Contributor Author

Copilot AI commented Nov 6, 2025

@copilot missed one place to install .NET 10 - the action.yml in .github/actions/setup-runtimes-caching

Fixed in commit 1e4e20d. Added 10.0.x to the dotnet-version list in .github/actions/setup-runtimes-caching/action.yml.

Copilot finished work on behalf of aaronpowell November 6, 2025 05:59
@aaronpowell aaronpowell force-pushed the copilot/add-dotnet-10-tfm-support branch from f10b449 to f3ff1ff Compare November 10, 2025 23:45
@aaronpowell aaronpowell marked this pull request as ready for review November 11, 2025 05:01
Copilot AI review requested due to automatic review settings November 11, 2025 05:01
@aaronpowell
Copy link
Member

The CI failures are related to #907 which 🤞 will not be a problem once .NET 10 RTW ships

cc @ErikEJ

Copilot finished reviewing on behalf of aaronpowell November 11, 2025 05:05
Copy link
Contributor

Copilot AI left a 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 DefaultTargetFramework from net8.0 to net10.0 in build configuration
  • Configured multi-targeting to net10.0;net8.0;net9.0 for 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>
Copy link

Copilot AI Nov 11, 2025

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.

Suggested change
<TargetFramework>net10.0</TargetFramework>

Copilot uses AI. Check for mistakes.
Comment on lines 7 to 8
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Copy link

Copilot AI Nov 11, 2025

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.

Suggested change
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Copilot uses AI. Check for mistakes.
<PackageVersion Include="Microsoft.Extensions.Options" Version="9.0.10" />

<ItemGroup Label="System">
<PackageVersion Include="System.Linq.Async" Version="6.0.1" />
Copy link

Copilot AI Nov 11, 2025

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.

Suggested change
<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" />

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants