Skip to content

Update project to support .NET 6.0 alongside .NET 8.0 and .NET 10#512

Merged
torosent merged 3 commits into
mainfrom
torosent/update-net-versions
Nov 24, 2025
Merged

Update project to support .NET 6.0 alongside .NET 8.0 and .NET 10#512
torosent merged 3 commits into
mainfrom
torosent/update-net-versions

Conversation

@torosent

@torosent torosent commented Nov 24, 2025

Copy link
Copy Markdown
Member

This pull request updates the supported .NET target frameworks across both the SDK and test projects to focus on .NET 10.0, while expanding SDK support to include .NET 6.0. Additionally, it updates the build pipeline to install the .NET 8 SDK and refactors source generator test utilities to use .NET 10.0 reference assemblies. These changes streamline test coverage and ensure compatibility with the latest .NET versions.

SDK and Worker/Client Project Framework Updates

  • Expanded target frameworks in Client.AzureManaged.csproj, Worker.AzureManaged.csproj, and ScheduledTasks.csproj to include net6.0, net8.0, and net10.0 for broader SDK compatibility. [1] [2] [3]

Test Project Framework Consolidation

Build Pipeline Improvements

  • Added a build step to install the .NET 8 SDK in the Azure Pipeline template to support builds that require this version.

Source Generator Test Refactoring

  • Updated CSharpSourceGeneratorVerifier.cs to use .NET 10.0 reference assemblies and refactored the reference assembly creation logic for future extensibility. [1] [2] [3]

General Codebase Maintenance

  • Minor code cleanup and import adjustments in utility files to support new framework targets.

Copilot AI review requested due to automatic review settings November 24, 2025 05:18
@torosent torosent closed this Nov 24, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 6.0 support to the Durable Task SDK alongside the existing .NET 8.0 and .NET 10.0 targets. This enhances compatibility for projects that require .NET 6.0 LTS support while maintaining support for newer framework versions.

Key Changes

  • Updated 8 project files (5 test projects and 3 source projects) to include net6.0 in their TargetFrameworks
  • Enhanced generator test infrastructure with conditional compilation to select appropriate reference assemblies based on the target framework
  • Updated build configuration to install .NET 8 SDK and improve multi-targeting output path handling

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/Worker/Grpc.Tests/Worker.Grpc.Tests.csproj Added net6.0 to TargetFrameworks alongside net8.0, net10.0, and net48
test/Worker/AzureManaged.Tests/Worker.AzureManaged.Tests.csproj Added net6.0 to TargetFrameworks alongside net8.0 and net10.0
test/ScheduledTasks.Tests/ScheduledTasks.Tests.csproj Added net6.0 to TargetFrameworks alongside net8.0 and net10.0
test/Generators.Tests/Utils/CSharpSourceGeneratorVerifier.cs Refactored to use conditional compilation for framework-specific reference assemblies, added support for net6.0 with Microsoft.NETCore.App.Ref 6.0.36
test/Generators.Tests/Generators.Tests.csproj Added net6.0 to TargetFrameworks alongside net8.0 and net10.0
test/Client/AzureManaged.Tests/Client.AzureManaged.Tests.csproj Added net6.0 to TargetFrameworks alongside net8.0 and net10.0
src/Worker/AzureManaged/Worker.AzureManaged.csproj Added net6.0 to TargetFrameworks alongside net8.0 and net10.0
src/ScheduledTasks/ScheduledTasks.csproj Added net6.0 to TargetFrameworks alongside net8.0 and net10.0
src/Client/AzureManaged/Client.AzureManaged.csproj Added net6.0 to TargetFrameworks alongside net8.0 and net10.0
eng/templates/build.yml Added .NET 8 SDK installation step to support multi-targeting build scenarios
Directory.Build.props Enhanced output path configuration to include framework-specific subdirectories, preventing build conflicts in multi-targeted projects

@torosent torosent reopened this Nov 24, 2025
Copilot AI review requested due to automatic review settings November 24, 2025 21:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 21 out of 21 changed files in this pull request and generated 16 comments.


<PropertyGroup>
<TargetFrameworks>net8.0;net10.0;net48</TargetFrameworks>
<TargetFramework>net10.0</TargetFramework>

Copilot AI Nov 24, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change contradicts the PR's stated goal. The PR description indicates adding .NET 6.0 support, but this change removes multi-targeting and only targets .NET 10.0, effectively removing support for .NET 8.0, .NET 6.0, and .NET Framework 4.8.

To align with the PR's goal, this should be:

<TargetFrameworks>net6.0;net8.0;net10.0;net48</TargetFrameworks>

This ensures the tests run against all supported frameworks, including the newly added .NET 6.0.

Suggested change
<TargetFramework>net10.0</TargetFramework>
<TargetFrameworks>net6.0;net8.0;net10.0;net48</TargetFrameworks>

Copilot uses AI. Check for mistakes.

<PropertyGroup>
<TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks>
<TargetFramework>net10.0</TargetFramework>

Copilot AI Nov 24, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change contradicts the PR's stated goal. The PR description indicates adding .NET 6.0 support, but this change removes multi-targeting and only targets .NET 10.0, effectively removing test coverage for .NET 6.0 and .NET 8.0.

To align with the PR's goal, this should remain:

<TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks>

This ensures the tests run against all supported frameworks.

Suggested change
<TargetFramework>net10.0</TargetFramework>
<TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks>

Copilot uses AI. Check for mistakes.

<PropertyGroup>
<TargetFrameworks>net6.0;net8.0;net10.0;netstandard2.0</TargetFrameworks>
<TargetFramework>net10.0</TargetFramework>

Copilot AI Nov 24, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change removes multi-targeting support from the test helpers project, which will impact all tests that depend on it. The original configuration supported .NET 6.0, .NET 8.0, .NET 10.0, and .NET Standard 2.0.

To align with the PR's goal and maintain compatibility across all frameworks, this should remain:

<TargetFrameworks>net6.0;net8.0;net10.0;netstandard2.0</TargetFrameworks>

Removing multi-targeting from a shared test helper project will force all dependent test projects to use only .NET 10.0, reducing test coverage.

Suggested change
<TargetFramework>net10.0</TargetFramework>
<TargetFrameworks>net6.0;net8.0;net10.0;netstandard2.0</TargetFrameworks>

Copilot uses AI. Check for mistakes.

<PropertyGroup>
<TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks>
<TargetFramework>net10.0</TargetFramework>

Copilot AI Nov 24, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change contradicts the PR's stated goal and removes test coverage. The source project src/InProcessTestHost/InProcessTestHost.csproj targets net6.0;net8.0;net10.0, but this test project now only targets .NET 10.0.

To align with the PR's goal and ensure comprehensive test coverage, this should remain:

<TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks>
Suggested change
<TargetFramework>net10.0</TargetFramework>
<TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks>

Copilot uses AI. Check for mistakes.

<PropertyGroup>
<TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks>
<TargetFramework>net10.0</TargetFramework>

Copilot AI Nov 24, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change contradicts the PR's stated goal and removes test coverage for .NET 6.0 and .NET 8.0.

To align with the PR's goal and ensure comprehensive test coverage, this should remain:

<TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks>
Suggested change
<TargetFramework>net10.0</TargetFramework>
<TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks>

Copilot uses AI. Check for mistakes.

<PropertyGroup>
<TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks>
<TargetFramework>net10.0</TargetFramework>

Copilot AI Nov 24, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change contradicts the PR's stated goal and removes test coverage for .NET 6.0 and .NET 8.0.

To align with the PR's goal and ensure comprehensive test coverage, this should remain:

<TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks>
Suggested change
<TargetFramework>net10.0</TargetFramework>
<TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks>

Copilot uses AI. Check for mistakes.

<PropertyGroup>
<TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks>
<TargetFramework>net10.0</TargetFramework>

Copilot AI Nov 24, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change contradicts the PR's stated goal and removes test coverage for .NET 6.0 and .NET 8.0.

To align with the PR's goal and ensure comprehensive test coverage, this should remain:

<TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks>
Suggested change
<TargetFramework>net10.0</TargetFramework>
<TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks>

Copilot uses AI. Check for mistakes.

<PropertyGroup>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<TargetFramework>net10.0</TargetFramework>

Copilot AI Nov 24, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change contradicts the PR's stated goal and removes test coverage. The original configuration tested against both .NET 8.0 and .NET 10.0.

To align with the PR's goal and ensure comprehensive test coverage, this should be:

<TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks>
Suggested change
<TargetFramework>net10.0</TargetFramework>
<TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks>

Copilot uses AI. Check for mistakes.

<PropertyGroup>
<TargetFrameworks>net6.0;net8.0;net10.0;net48</TargetFrameworks>
<TargetFramework>net10.0</TargetFramework>

Copilot AI Nov 24, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change contradicts the PR's stated goal and removes test coverage. The original configuration tested against .NET 6.0, .NET 8.0, .NET 10.0, and .NET Framework 4.8, but now only targets .NET 10.0.

To align with the PR's goal and ensure comprehensive test coverage, this should remain:

<TargetFrameworks>net6.0;net8.0;net10.0;net48</TargetFrameworks>
Suggested change
<TargetFramework>net10.0</TargetFramework>
<TargetFrameworks>net6.0;net8.0;net10.0;net48</TargetFrameworks>

Copilot uses AI. Check for mistakes.

<PropertyGroup>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<TargetFramework>net10.0</TargetFramework>

Copilot AI Nov 24, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change contradicts the PR's stated goal and removes test coverage. The source project src/Client/AzureManaged/Client.AzureManaged.csproj is being updated to target net6.0;net8.0;net10.0, but this test project now only targets .NET 10.0.

To align with the PR's goal and ensure comprehensive test coverage, this should be:

<TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks>
Suggested change
<TargetFramework>net10.0</TargetFramework>
<TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks>

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.

3 participants