Skip to content

Drop .NET 6 support and modernize dependencies - #1384

Closed
Bernd Verst (berndverst) wants to merge 2 commits into
mainfrom
berndverst-drop-dotnet-6-support
Closed

Drop .NET 6 support and modernize dependencies#1384
Bernd Verst (berndverst) wants to merge 2 commits into
mainfrom
berndverst-drop-dotnet-6-support

Conversation

@berndverst

Copy link
Copy Markdown
Member

Summary

  • raise the minimum modern runtime to .NET 8 and recommend .NET 10 while preserving .NET Framework 4.7.2+
  • publish explicit net8.0/net472 assets, retaining net48 only where provider behavior differs
  • modernize the dependency graph, including patched Framework-compatible overrides for legacy Service Bus and Storage paths
  • update installation guidance, samples, official builds, CodeQL, MSTest usage, serialization compatibility, and W3C tracing behavior

Compatibility

  • Core, Azure Storage, Application Insights: net8.0;net472
  • Emulator, Service Bus: net8.0;net472;net48
  • Azure Service Fabric: net472;net48
  • Service Bus uses Azure.Messaging.ServiceBus on net8.0/net472 and preserves WindowsAzure.ServiceBus on net48

Validation

  • full solution builds cleanly with SDK 8.0.300 and SDK 10.0.302
  • Core and Emulator test matrices pass on net8.0 and net48
  • Azure Storage targeted and isolated retry coverage passes on both runtime paths
  • Service Bus infrastructure-independent tests pass on net8.0 and net48
  • all 23 PackageReference projects report no vulnerable or deprecated direct/transitive packages
  • all six shipping NuGet packages were packed and their target/dependency groups verified

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: acbcca93-370b-4cb8-a98b-b8d662acab49
CopilotAI lite review requested due to automatic review settings August 11, 2026 07:08

CopilotAI 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 raises the minimum modern runtime baseline to .NET 8 (while retaining .NET Framework 4.7.2+) and updates the codebase, tests, docs, and CI to match the new multi-targeting and dependency graph.

Changes:

  • Retargets core/providers/tests to net8.0 + net472 (with net48 retained where provider behavior differs, e.g., Service Bus).
  • Modernizes dependencies, GitHub Actions/CodeQL, and build templates; updates docs and samples to .NET 8 prerequisites.
  • Updates tracing (explicit W3C activity creation) and refactors tests/assertions (MSTest + JSON token comparisons).

Reviewed changes

Copilot reviewed 79 out of 79 changed files in this pull request and generated 13 comments.

Show a summary per file
FileDescription
test/DurableTask.Test.Orchestrations/SimpleOrchestrations.csUpdates TaskCompletionSource construction for newer TFMs.
test/DurableTask.Test.Orchestrations/DurableTask.Test.Orchestrations.csprojRetargets orchestrations test project to net8/net472/net48.
test/DurableTask.ServiceBus.Tests/ServiceBusOrchestrationServiceTests.csAdds JSON token assertions; updates output/input assertions.
test/DurableTask.ServiceBus.Tests/SampleScenarioTests.csUses ThrowsExactlyAsync for stricter exception assertions.
test/DurableTask.ServiceBus.Tests/OrchestrationHubTableClientTests.csNormalizes Assert.AreEqual argument ordering / null assertions.
test/DurableTask.ServiceBus.Tests/InstanceStoreQueryTests.csSimplifies exception assertion helper using ThrowsExactly.
test/DurableTask.ServiceBus.Tests/ErrorHandlingTests.csRe-enables TestMethod attribute (still ignored).
test/DurableTask.Emulator.Tests/EmulatorFunctionalTests.csUses ThrowsExactlyAsync for duplicate instance checks.
test/DurableTask.Core.Tests/WorkItemDispatcherTests.csSimplifies BeginScope implementation for newer TFMs.
test/DurableTask.Core.Tests/TraceContextBaseTest.csUses ThrowsExactly for exception assertions.
test/DurableTask.Core.Tests/RetryInterceptorTests.csUpdates assertions and (attempts to) adjust data-driven test attributes.
test/DurableTask.Core.Tests/ExceptionHandlingIntegrationTests.csUpdates data-driven test attributes and logging/test behavior.
test/DurableTask.Core.Tests/DispatcherMiddlewareTests.csUpdates data-driven test attributes for middleware test.
test/DurableTask.Core.Tests/ContinueAsNewTraceBehaviorTests.csUpdates ActivityListener sampling; replaces ExpectedException with ThrowsExactly.
test/DurableTask.AzureStorage.Tests/TestTablePartitionManager.csNormalizes Assert.AreEqual argument ordering.
test/DurableTask.AzureStorage.Tests/StressTests.csUpdates data-driven test attributes.
test/DurableTask.AzureStorage.Tests/Storage/TableDeleteBatchParallelTests.csUses ThrowsExactlyAsync for cancellation behavior test.
Test/DurableTask.AzureStorage.Tests/Storage/DurableTaskStorageExceptionTests.csUpdates data-driven test attributes in storage exception tests.
test/DurableTask.AzureStorage.Tests/Net/UriPathTests.csUpdates data-driven test attributes for UriPath.Combine cases.
test/DurableTask.AzureStorage.Tests/MessageManagerTests.csUpdates data-driven test attributes; tightens exception assertion.
test/DurableTask.AzureStorage.Tests/KeySanitationTests.csUpdates data-driven test attributes for sanitization round-trips.
test/DurableTask.AzureStorage.Tests/DurableTask.AzureStorage.Tests.csprojAdjusts framework-conditional package references for updated baseline.
test/DurableTask.AzureStorage.Tests/Correlation/StringExtensionsTest.csUses ThrowsExactly for invalid traceparent parsing.
test/DurableTask.AzureStorage.Tests/Correlation/CorrelationScenarioTest.csUpdates many data-driven test attributes across correlation scenarios.
test/DurableTask.AzureStorage.Tests/AzureTableQueryFilterTests.csUpdates data-driven test attributes for filter formatting tests.
test/DurableTask.AzureStorage.Tests/AzureStorageScenarioTests.csAdds JSON token helpers; updates many asserts and data-driven attributes.
test/DurableTask.AzureStorage.Tests/AzureStorageScaleTests.csUpdates data-driven test attributes; uses ThrowsExactlyAsync in scale tests.
test/DurableTask.AzureStorage.Tests/AsyncAutoResetEventTests.csUpdates data-driven test attributes and assertion ordering.
test/DurableTask.AzureServiceFabric.Integration.Tests/DurableTask.AzureServiceFabric.Integration.Tests.csprojRemoves pinned System.Collections.Immutable override.
src/DurableTask.ServiceBus/Settings/ServiceBusConnectionSettings.csSwitches conditional compilation to USE_AZURE_MESSAGING_SERVICEBUS.
src/DurableTask.ServiceBus/ServiceBusOrchestrationService.csUses USE_AZURE_MESSAGING_SERVICEBUS to select SB SDK path.
src/DurableTask.ServiceBus/DurableTask.ServiceBus.csprojRetargets to net8/net472/net48 and defines USE_AZURE_MESSAGING_SERVICEBUS.
src/DurableTask.ServiceBus/Common/ServiceBusUtils.csUpdates conditional compilation for SB message body handling.
src/DurableTask.ServiceBus/Common/Abstraction/ServiceBusAbstraction.csUpdates abstraction conditionals to USE_AZURE_MESSAGING_SERVICEBUS.
src/DurableTask.Emulator/DurableTask.Emulator.csprojRetargets emulator package to net8/net472/net48.
src/DurableTask.Core/Tracing/TraceHelper.csMoves to CreateActivity + explicit W3C IDs and StartTime handling.
src/DurableTask.Core/TaskOrchestrationExecutor.csNullability updates for SynchronizationContext and callback state.
src/DurableTask.Core/TaskOrchestrationDispatcher.csTightens null handling around trace context and emit calls.
src/DurableTask.Core/Serializing/JsonDataConverter.csUnifies on SerializationBinder usage.
src/DurableTask.Core/ISupportsDurableTraceContext.csSimplifies ActivityContext->traceparent assignment.
src/DurableTask.Core/FailureDetails.csImproves serialization null handling and error type extraction.
src/DurableTask.Core/Exceptions/TypeMissingException.csMarks formatter-serialization ctor obsolete on NET8+.
src/DurableTask.Core/Exceptions/TaskFailureException.csMarks formatter serialization APIs obsolete on NET8+.
src/DurableTask.Core/Exceptions/TaskFailedExceptionDeserializationException.csMarks formatter-serialization ctor obsolete on NET8+.
src/DurableTask.Core/Exceptions/TaskFailedException.csMarks formatter serialization APIs obsolete on NET8+.
src/DurableTask.Core/Exceptions/SubOrchestrationFailedException.csMarks formatter serialization APIs obsolete on NET8+.
src/DurableTask.Core/Exceptions/SessionAbortedException.csMarks formatter-serialization ctor obsolete on NET8+.
src/DurableTask.Core/Exceptions/OrchestrationFrameworkException.csMarks formatter-serialization ctor obsolete on NET8+.
src/DurableTask.Core/Exceptions/OrchestrationFailureException.csMarks formatter serialization APIs obsolete on NET8+.
src/DurableTask.Core/Exceptions/OrchestrationException.csMarks formatter serialization APIs obsolete on NET8+; null-safe FailureDetails read.
src/DurableTask.Core/Exceptions/OrchestrationAlreadyExistsException.csMarks formatter-serialization ctor obsolete on NET8+.
src/DurableTask.Core/Exceptions/NonDeterministicOrchestrationException.csMarks formatter-serialization ctor obsolete on NET8+.
src/DurableTask.Core/Exceptions/EntitySchedulerException.csMarks formatter-serialization ctor obsolete on NET8+.
src/DurableTask.Core/Entities/OrchestrationEntityContext.csAdds explicit guardrails around lock-state nullability.
src/DurableTask.Core/Entities/EntityId.csImproves null safety in Equals/CompareTo.
src/DurableTask.Core/DurableTask.Core.csprojRetargets core library to net8.0/net472.
src/DurableTask.Core/Common/Utils.csUnifies SerializationBinder usage and adds minor null-safety improvements.
src/DurableTask.AzureStorage/Tracking/TableEntityConverter.csSuppresses SYSLIB0050 for legacy formatter-based materialization.
src/DurableTask.AzureStorage/Tracking/AzureTableTrackingStore.csSuppresses SYSLIB0050 for history event materialization; gates Nagle tweak to NETFRAMEWORK.
src/DurableTask.AzureStorage/Storage/BlobContainer.csNullability annotation for blob metadata read.
src/DurableTask.AzureStorage/Partitioning/TablePartitionManager.csAdds nullable annotation to TryGetValue out var.
src/DurableTask.AzureStorage/Partitioning/LeaseLostException.csMarks formatter serialization APIs obsolete on NET8+.
src/DurableTask.AzureStorage/OrchestrationSessionManager.csAdds nullability annotations for session/queue lookups.
src/DurableTask.AzureStorage/Messaging/TaskHubQueue.csSimplifies reflection-based name lookup with null-safe patterns.
src/DurableTask.AzureStorage/Messaging/ControlQueue.csMakes comparer null-safe for MessageData comparisons.
src/DurableTask.AzureStorage/MessageManager.csUnifies SerializationBinder implementation; removes netstandard conditional binder variants.
src/DurableTask.AzureStorage/DurableTask.AzureStorage.csprojRetargets Azure Storage provider to net8.0/net472.
src/DurableTask.AzureStorage/AzureStorageOrchestrationService.csGates Nagle tweak to NETFRAMEWORK; refactors control-queue caching logic.
src/DurableTask.AzureServiceFabric/README.mdUpdates stated .NET Framework support level.
src/DurableTask.AzureServiceFabric/DurableTask.AzureServiceFabric.csprojRemoves unused netstandard2.0-specific package block.
src/DurableTask.ApplicationInsights/DurableTask.ApplicationInsights.csprojRetargets ApplicationInsights integration to net8.0/net472.
samples/DistributedTraceSample/README.mdUpdates sample prerequisites to .NET 8+.
samples/DistributedTraceSample/ApplicationInsights/README.mdUpdates sample prerequisites to .NET 8+.
samples/Correlation.Samples/docs/getting-started.mdUpdates Visual Studio prerequisite to VS 2022 17.8+.
eng/templates/build.ymlPins .NET 8 SDK usage and updates Visual Studio version to 17.0.
docs/providers/service-bus.mdUpdates managed identity guidance to .NET 8+/net472 targets.
docs/getting-started/installation.mdUpdates prerequisites to .NET 8+ (recommending .NET 10).
Directory.Packages.propsUpdates and rebalances PackageVersion graph for modern TFMs.
.github/workflows/codeQL.ymlUpdates CodeQL and Actions versions; simplifies .NET setup to .NET 8.
Suppressed comments (3)

test/DurableTask.Core.Tests/RetryInterceptorTests.cs:62

  • This test uses [DataRow] and has a parameter (maxAttempts), which requires [DataTestMethod] for MSTest to discover/execute the data-driven cases. With [TestMethod], the method is an invalid test and the DataRow cases won’t run.
    test/DurableTask.Core.Tests/ExceptionHandlingIntegrationTests.cs:126
  • This test is parameterized via [DataRow] and has a parameter (mode), which requires [DataTestMethod]. With [TestMethod], MSTest won’t run the data-driven cases (and may not discover the test correctly).
    test/DurableTask.AzureStorage.Tests/MessageManagerTests.cs:72
  • This test is data-driven ([DataRow] + parameters blob/blobUrl). MSTest requires [DataTestMethod] for parameterized tests; with [TestMethod] the DataRow cases won’t run.

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment threadtest/DurableTask.Core.Tests/RetryInterceptorTests.cs
Comment threadtest/DurableTask.Core.Tests/DispatcherMiddlewareTests.cs
Comment threadtest/DurableTask.AzureStorage.Tests/StressTests.cs
Comment threadtest/DurableTask.AzureStorage.Tests/Net/UriPathTests.cs
Add an explicit non-null assertion before validating the completed orchestration status.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: acbcca93-370b-4cb8-a98b-b8d662acab49
CopilotAI review requested due to automatic review settings August 11, 2026 16:49

CopilotAI 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 79 out of 79 changed files in this pull request and generated no new comments.

Suppressed comments (15)

test/DurableTask.Core.Tests/RetryInterceptorTests.cs:38

  • This is a parameterized MSTest using [DataRow]. With [TestMethod] the test will not be discovered/executed correctly (MSTest requires [DataTestMethod] or another data-driven attribute for parameterized tests).
    test/DurableTask.Core.Tests/RetryInterceptorTests.cs:66
  • This is a parameterized MSTest using [DataRow]. With [TestMethod] the test will not be discovered/executed correctly (MSTest requires [DataTestMethod] or another data-driven attribute for parameterized tests).
    test/DurableTask.Core.Tests/ExceptionHandlingIntegrationTests.cs:55
  • This test uses [DataRow] and has a parameter. MSTest requires [DataTestMethod] (or [DynamicData]) for data-driven tests; [TestMethod] will cause discovery/execution failures.
    test/DurableTask.Core.Tests/DispatcherMiddlewareTests.cs:346
  • This test uses [DataRow] and has a parameter. MSTest requires [DataTestMethod] (or [DynamicData]) for data-driven tests; [TestMethod] will cause discovery/execution failures.
    test/DurableTask.AzureStorage.Tests/AsyncAutoResetEventTests.cs:27
  • This is a parameterized MSTest using [DataRow]. With [TestMethod] the test will not be discovered/executed correctly; use [DataTestMethod].
    test/DurableTask.AzureStorage.Tests/Net/UriPathTests.cs:24
  • This is a parameterized MSTest using [DataRow]. With [TestMethod] the test will not be discovered/executed correctly; use [DataTestMethod].
    test/DurableTask.AzureStorage.Tests/MessageManagerTests.cs:29
  • This is a parameterized MSTest using [DataRow]. With [TestMethod] the test will not be discovered/executed correctly; use [DataTestMethod].
    test/DurableTask.AzureStorage.Tests/MessageManagerTests.cs:76
  • This is a parameterized MSTest using [DataRow]. With [TestMethod] the test will not be discovered/executed correctly; use [DataTestMethod].
    test/DurableTask.AzureStorage.Tests/KeySanitationTests.cs:31
  • This test uses [DataRow] and has a parameter. MSTest requires [DataTestMethod] (or [DynamicData]) for data-driven tests; [TestMethod] will cause discovery/execution failures.
    test/DurableTask.AzureStorage.Tests/AzureTableQueryFilterTests.cs:28
  • These tests use [DataRow] and have parameters. MSTest requires [DataTestMethod] (or [DynamicData]) for data-driven tests; [TestMethod] will cause discovery/execution failures. (This applies to the other [TestMethod]+[DataRow] blocks in this file as well.)
    test/DurableTask.AzureStorage.Tests/Correlation/CorrelationScenarioTest.cs:39
  • This test uses [DataRow] and has parameters. MSTest requires [DataTestMethod] (or [DynamicData]) for data-driven tests; [TestMethod] will cause discovery/execution failures.
    test/DurableTask.AzureStorage.Tests/StressTests.cs:55
  • This is a parameterized MSTest using [DataRow]. With [TestMethod] the test will not be discovered/executed correctly; use [DataTestMethod].
    test/DurableTask.AzureStorage.Tests/AzureStorageScenarioTests.cs:72
  • This is a parameterized MSTest using [DataRow]. With [TestMethod] the test will not be discovered/executed correctly; use [DataTestMethod].
    test/DurableTask.AzureStorage.Tests/AzureStorageScaleTests.cs:216
  • This test uses [DataRow] and has parameters. MSTest requires [DataTestMethod] (or [DynamicData]) for data-driven tests; [TestMethod] will cause discovery/execution failures.
    Test/DurableTask.AzureStorage.Tests/Storage/DurableTaskStorageExceptionTests.cs:37
  • This test uses [DataRow] and has parameters. MSTest requires [DataTestMethod] (or [DynamicData]) for data-driven tests; [TestMethod] will cause discovery/execution failures.
 [TestMethod]
[DataRow(true, HttpStatusCode.Conflict, nameof(BlobErrorCode.LeaseLost))]
[DataRow(false, HttpStatusCode.Conflict, nameof(BlobErrorCode.LeaseNotPresentWithBlobOperation))]
[DataRow(false, HttpStatusCode.NotFound, nameof(BlobErrorCode.BlobNotFound))]
public void ValidRequestFailedException(bool expectedLease, HttpStatusCode statusCode, string errorCode)

Sign up for freeto 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

@berndverst