Update project to support .NET 6.0 alongside .NET 8.0 and .NET 10#512
Conversation
…d adjust build configurations
There was a problem hiding this comment.
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.0in 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 |
…ort for multiple target frameworks
|
|
||
| <PropertyGroup> | ||
| <TargetFrameworks>net8.0;net10.0;net48</TargetFrameworks> | ||
| <TargetFramework>net10.0</TargetFramework> |
There was a problem hiding this comment.
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.
| <TargetFramework>net10.0</TargetFramework> | |
| <TargetFrameworks>net6.0;net8.0;net10.0;net48</TargetFrameworks> |
|
|
||
| <PropertyGroup> | ||
| <TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks> | ||
| <TargetFramework>net10.0</TargetFramework> |
There was a problem hiding this comment.
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.
| <TargetFramework>net10.0</TargetFramework> | |
| <TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks> |
|
|
||
| <PropertyGroup> | ||
| <TargetFrameworks>net6.0;net8.0;net10.0;netstandard2.0</TargetFrameworks> | ||
| <TargetFramework>net10.0</TargetFramework> |
There was a problem hiding this comment.
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.
| <TargetFramework>net10.0</TargetFramework> | |
| <TargetFrameworks>net6.0;net8.0;net10.0;netstandard2.0</TargetFrameworks> |
|
|
||
| <PropertyGroup> | ||
| <TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks> | ||
| <TargetFramework>net10.0</TargetFramework> |
There was a problem hiding this comment.
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>| <TargetFramework>net10.0</TargetFramework> | |
| <TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks> |
|
|
||
| <PropertyGroup> | ||
| <TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks> | ||
| <TargetFramework>net10.0</TargetFramework> |
There was a problem hiding this comment.
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>| <TargetFramework>net10.0</TargetFramework> | |
| <TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks> |
|
|
||
| <PropertyGroup> | ||
| <TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks> | ||
| <TargetFramework>net10.0</TargetFramework> |
There was a problem hiding this comment.
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>| <TargetFramework>net10.0</TargetFramework> | |
| <TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks> |
|
|
||
| <PropertyGroup> | ||
| <TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks> | ||
| <TargetFramework>net10.0</TargetFramework> |
There was a problem hiding this comment.
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>| <TargetFramework>net10.0</TargetFramework> | |
| <TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks> |
|
|
||
| <PropertyGroup> | ||
| <TargetFrameworks>net8.0;net10.0</TargetFrameworks> | ||
| <TargetFramework>net10.0</TargetFramework> |
There was a problem hiding this comment.
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>| <TargetFramework>net10.0</TargetFramework> | |
| <TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks> |
|
|
||
| <PropertyGroup> | ||
| <TargetFrameworks>net6.0;net8.0;net10.0;net48</TargetFrameworks> | ||
| <TargetFramework>net10.0</TargetFramework> |
There was a problem hiding this comment.
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>| <TargetFramework>net10.0</TargetFramework> | |
| <TargetFrameworks>net6.0;net8.0;net10.0;net48</TargetFrameworks> |
|
|
||
| <PropertyGroup> | ||
| <TargetFrameworks>net8.0;net10.0</TargetFrameworks> | ||
| <TargetFramework>net10.0</TargetFramework> |
There was a problem hiding this comment.
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>| <TargetFramework>net10.0</TargetFramework> | |
| <TargetFrameworks>net6.0;net8.0;net10.0</TargetFrameworks> |
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
Client.AzureManaged.csproj,Worker.AzureManaged.csproj, andScheduledTasks.csprojto includenet6.0,net8.0, andnet10.0for broader SDK compatibility. [1] [2] [3]Test Project Framework Consolidation
net10.0, removing support for older frameworks and simplifying test execution. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]Build Pipeline Improvements
Source Generator Test Refactoring
CSharpSourceGeneratorVerifier.csto use .NET 10.0 reference assemblies and refactored the reference assembly creation logic for future extensibility. [1] [2] [3]General Codebase Maintenance