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
Copilot AI lite review requested due to automatic review settings August 11, 2026 07:08
Comment thread test/DurableTask.AzureStorage.Tests/AzureStorageScenarioTests.cs Fixed

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 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
File Description
test/DurableTask.Test.Orchestrations/SimpleOrchestrations.cs Updates TaskCompletionSource construction for newer TFMs.
test/DurableTask.Test.Orchestrations/DurableTask.Test.Orchestrations.csproj Retargets orchestrations test project to net8/net472/net48.
test/DurableTask.ServiceBus.Tests/ServiceBusOrchestrationServiceTests.cs Adds JSON token assertions; updates output/input assertions.
test/DurableTask.ServiceBus.Tests/SampleScenarioTests.cs Uses ThrowsExactlyAsync for stricter exception assertions.
test/DurableTask.ServiceBus.Tests/OrchestrationHubTableClientTests.cs Normalizes Assert.AreEqual argument ordering / null assertions.
test/DurableTask.ServiceBus.Tests/InstanceStoreQueryTests.cs Simplifies exception assertion helper using ThrowsExactly.
test/DurableTask.ServiceBus.Tests/ErrorHandlingTests.cs Re-enables TestMethod attribute (still ignored).
test/DurableTask.Emulator.Tests/EmulatorFunctionalTests.cs Uses ThrowsExactlyAsync for duplicate instance checks.
test/DurableTask.Core.Tests/WorkItemDispatcherTests.cs Simplifies BeginScope implementation for newer TFMs.
test/DurableTask.Core.Tests/TraceContextBaseTest.cs Uses ThrowsExactly for exception assertions.
test/DurableTask.Core.Tests/RetryInterceptorTests.cs Updates assertions and (attempts to) adjust data-driven test attributes.
test/DurableTask.Core.Tests/ExceptionHandlingIntegrationTests.cs Updates data-driven test attributes and logging/test behavior.
test/DurableTask.Core.Tests/DispatcherMiddlewareTests.cs Updates data-driven test attributes for middleware test.
test/DurableTask.Core.Tests/ContinueAsNewTraceBehaviorTests.cs Updates ActivityListener sampling; replaces ExpectedException with ThrowsExactly.
test/DurableTask.AzureStorage.Tests/TestTablePartitionManager.cs Normalizes Assert.AreEqual argument ordering.
test/DurableTask.AzureStorage.Tests/StressTests.cs Updates data-driven test attributes.
test/DurableTask.AzureStorage.Tests/Storage/TableDeleteBatchParallelTests.cs Uses ThrowsExactlyAsync for cancellation behavior test.
Test/DurableTask.AzureStorage.Tests/Storage/DurableTaskStorageExceptionTests.cs Updates data-driven test attributes in storage exception tests.
test/DurableTask.AzureStorage.Tests/Net/UriPathTests.cs Updates data-driven test attributes for UriPath.Combine cases.
test/DurableTask.AzureStorage.Tests/MessageManagerTests.cs Updates data-driven test attributes; tightens exception assertion.
test/DurableTask.AzureStorage.Tests/KeySanitationTests.cs Updates data-driven test attributes for sanitization round-trips.
test/DurableTask.AzureStorage.Tests/DurableTask.AzureStorage.Tests.csproj Adjusts framework-conditional package references for updated baseline.
test/DurableTask.AzureStorage.Tests/Correlation/StringExtensionsTest.cs Uses ThrowsExactly for invalid traceparent parsing.
test/DurableTask.AzureStorage.Tests/Correlation/CorrelationScenarioTest.cs Updates many data-driven test attributes across correlation scenarios.
test/DurableTask.AzureStorage.Tests/AzureTableQueryFilterTests.cs Updates data-driven test attributes for filter formatting tests.
test/DurableTask.AzureStorage.Tests/AzureStorageScenarioTests.cs Adds JSON token helpers; updates many asserts and data-driven attributes.
test/DurableTask.AzureStorage.Tests/AzureStorageScaleTests.cs Updates data-driven test attributes; uses ThrowsExactlyAsync in scale tests.
test/DurableTask.AzureStorage.Tests/AsyncAutoResetEventTests.cs Updates data-driven test attributes and assertion ordering.
test/DurableTask.AzureServiceFabric.Integration.Tests/DurableTask.AzureServiceFabric.Integration.Tests.csproj Removes pinned System.Collections.Immutable override.
src/DurableTask.ServiceBus/Settings/ServiceBusConnectionSettings.cs Switches conditional compilation to USE_AZURE_MESSAGING_SERVICEBUS.
src/DurableTask.ServiceBus/ServiceBusOrchestrationService.cs Uses USE_AZURE_MESSAGING_SERVICEBUS to select SB SDK path.
src/DurableTask.ServiceBus/DurableTask.ServiceBus.csproj Retargets to net8/net472/net48 and defines USE_AZURE_MESSAGING_SERVICEBUS.
src/DurableTask.ServiceBus/Common/ServiceBusUtils.cs Updates conditional compilation for SB message body handling.
src/DurableTask.ServiceBus/Common/Abstraction/ServiceBusAbstraction.cs Updates abstraction conditionals to USE_AZURE_MESSAGING_SERVICEBUS.
src/DurableTask.Emulator/DurableTask.Emulator.csproj Retargets emulator package to net8/net472/net48.
src/DurableTask.Core/Tracing/TraceHelper.cs Moves to CreateActivity + explicit W3C IDs and StartTime handling.
src/DurableTask.Core/TaskOrchestrationExecutor.cs Nullability updates for SynchronizationContext and callback state.
src/DurableTask.Core/TaskOrchestrationDispatcher.cs Tightens null handling around trace context and emit calls.
src/DurableTask.Core/Serializing/JsonDataConverter.cs Unifies on SerializationBinder usage.
src/DurableTask.Core/ISupportsDurableTraceContext.cs Simplifies ActivityContext->traceparent assignment.
src/DurableTask.Core/FailureDetails.cs Improves serialization null handling and error type extraction.
src/DurableTask.Core/Exceptions/TypeMissingException.cs Marks formatter-serialization ctor obsolete on NET8+.
src/DurableTask.Core/Exceptions/TaskFailureException.cs Marks formatter serialization APIs obsolete on NET8+.
src/DurableTask.Core/Exceptions/TaskFailedExceptionDeserializationException.cs Marks formatter-serialization ctor obsolete on NET8+.
src/DurableTask.Core/Exceptions/TaskFailedException.cs Marks formatter serialization APIs obsolete on NET8+.
src/DurableTask.Core/Exceptions/SubOrchestrationFailedException.cs Marks formatter serialization APIs obsolete on NET8+.
src/DurableTask.Core/Exceptions/SessionAbortedException.cs Marks formatter-serialization ctor obsolete on NET8+.
src/DurableTask.Core/Exceptions/OrchestrationFrameworkException.cs Marks formatter-serialization ctor obsolete on NET8+.
src/DurableTask.Core/Exceptions/OrchestrationFailureException.cs Marks formatter serialization APIs obsolete on NET8+.
src/DurableTask.Core/Exceptions/OrchestrationException.cs Marks formatter serialization APIs obsolete on NET8+; null-safe FailureDetails read.
src/DurableTask.Core/Exceptions/OrchestrationAlreadyExistsException.cs Marks formatter-serialization ctor obsolete on NET8+.
src/DurableTask.Core/Exceptions/NonDeterministicOrchestrationException.cs Marks formatter-serialization ctor obsolete on NET8+.
src/DurableTask.Core/Exceptions/EntitySchedulerException.cs Marks formatter-serialization ctor obsolete on NET8+.
src/DurableTask.Core/Entities/OrchestrationEntityContext.cs Adds explicit guardrails around lock-state nullability.
src/DurableTask.Core/Entities/EntityId.cs Improves null safety in Equals/CompareTo.
src/DurableTask.Core/DurableTask.Core.csproj Retargets core library to net8.0/net472.
src/DurableTask.Core/Common/Utils.cs Unifies SerializationBinder usage and adds minor null-safety improvements.
src/DurableTask.AzureStorage/Tracking/TableEntityConverter.cs Suppresses SYSLIB0050 for legacy formatter-based materialization.
src/DurableTask.AzureStorage/Tracking/AzureTableTrackingStore.cs Suppresses SYSLIB0050 for history event materialization; gates Nagle tweak to NETFRAMEWORK.
src/DurableTask.AzureStorage/Storage/BlobContainer.cs Nullability annotation for blob metadata read.
src/DurableTask.AzureStorage/Partitioning/TablePartitionManager.cs Adds nullable annotation to TryGetValue out var.
src/DurableTask.AzureStorage/Partitioning/LeaseLostException.cs Marks formatter serialization APIs obsolete on NET8+.
src/DurableTask.AzureStorage/OrchestrationSessionManager.cs Adds nullability annotations for session/queue lookups.
src/DurableTask.AzureStorage/Messaging/TaskHubQueue.cs Simplifies reflection-based name lookup with null-safe patterns.
src/DurableTask.AzureStorage/Messaging/ControlQueue.cs Makes comparer null-safe for MessageData comparisons.
src/DurableTask.AzureStorage/MessageManager.cs Unifies SerializationBinder implementation; removes netstandard conditional binder variants.
src/DurableTask.AzureStorage/DurableTask.AzureStorage.csproj Retargets Azure Storage provider to net8.0/net472.
src/DurableTask.AzureStorage/AzureStorageOrchestrationService.cs Gates Nagle tweak to NETFRAMEWORK; refactors control-queue caching logic.
src/DurableTask.AzureServiceFabric/README.md Updates stated .NET Framework support level.
src/DurableTask.AzureServiceFabric/DurableTask.AzureServiceFabric.csproj Removes unused netstandard2.0-specific package block.
src/DurableTask.ApplicationInsights/DurableTask.ApplicationInsights.csproj Retargets ApplicationInsights integration to net8.0/net472.
samples/DistributedTraceSample/README.md Updates sample prerequisites to .NET 8+.
samples/DistributedTraceSample/ApplicationInsights/README.md Updates sample prerequisites to .NET 8+.
samples/Correlation.Samples/docs/getting-started.md Updates Visual Studio prerequisite to VS 2022 17.8+.
eng/templates/build.yml Pins .NET 8 SDK usage and updates Visual Studio version to 17.0.
docs/providers/service-bus.md Updates managed identity guidance to .NET 8+/net472 targets.
docs/getting-started/installation.md Updates prerequisites to .NET 8+ (recommending .NET 10).
Directory.Packages.props Updates and rebalances PackageVersion graph for modern TFMs.
.github/workflows/codeQL.yml Updates 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 thread test/DurableTask.Core.Tests/RetryInterceptorTests.cs
Comment thread test/DurableTask.Core.Tests/ExceptionHandlingIntegrationTests.cs
Comment thread test/DurableTask.Core.Tests/DispatcherMiddlewareTests.cs
Comment thread test/DurableTask.AzureStorage.Tests/StressTests.cs
Comment thread test/DurableTask.AzureStorage.Tests/Net/UriPathTests.cs
Comment thread test/DurableTask.AzureStorage.Tests/AzureTableQueryFilterTests.cs
Comment thread test/DurableTask.AzureStorage.Tests/AzureStorageScenarioTests.cs
Comment thread test/DurableTask.AzureStorage.Tests/AzureStorageScaleTests.cs
Comment thread test/DurableTask.AzureStorage.Tests/AsyncAutoResetEventTests.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
Copilot AI review requested due to automatic review settings August 11, 2026 16:49

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 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 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