fix: revert shared framework packages to 8.x for net8 Functions host compatibility#698
Merged
Merged
Conversation
YunchuWang
force-pushed
the
wangbill/fix-net8-host-compat
branch
3 times, most recently
from
April 3, 2026 04:02
e6e733f to
e902278
Compare
YunchuWang
marked this pull request as ready for review
April 3, 2026 04:07
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to restore Azure Functions in-proc host (net8.0) compatibility by pinning shared-framework dependencies back to 8.x so the extension assemblies don’t require Microsoft.Extensions.* (and related) 10.x assembly versions that the host cannot load.
Changes:
- Adds an IMPORTANT note in
Directory.Packages.propsexplaining the Azure Functions host shared-framework constraint. - Reverts several centrally-managed shared-framework package versions (e.g.,
System.Text.Json,Microsoft.Bcl.AsyncInterfaces, variousMicrosoft.Extensions.*) back to 8.x.
torosent
approved these changes
Apr 3, 2026
YunchuWang
force-pushed
the
wangbill/fix-net8-host-compat
branch
from
April 3, 2026 04:21
dfd5d8c to
c7f85e7
Compare
…compatibility The Azure Functions host process runs on net8.0 and loads DurableTask extension assemblies into its process. Packages like Microsoft.Extensions.*, Bcl.AsyncInterfaces, and System.Text.Json are part of the .NET shared framework - the host only provides version 8.0.0.0 of these assemblies. PR #510 upgraded these to 10.x, which causes FileNotFoundException at runtime: Could not load file or assembly 'Microsoft.Extensions.Options, Version=10.0.0.0' This reverts the 11 shared-framework packages to 8.x while keeping all other dependency upgrades (Grpc, Protobuf, Azure.Storage.Blobs, Azure.Identity, etc). Packages reverted: - Microsoft.Extensions.* (9 packages): 10.0.2 -> 8.x - Microsoft.Bcl.AsyncInterfaces: 10.0.2 -> 8.0.0 - System.Text.Json: 10.0.2 -> 8.0.5 Test project fix: - Generators.Tests: VersionOverride for DependencyInjection (net10 test project needs 10.x via Functions.Worker transitive dep, safe since tests don't load into the Functions host) global.json: relaxed SDK version to match installed 10.0.104
YunchuWang
force-pushed
the
wangbill/fix-net8-host-compat
branch
from
April 3, 2026 04:25
c7f85e7 to
9cdd6df
Compare
torosent
approved these changes
Apr 3, 2026
YunchuWang
pushed a commit
to YunchuWang/durabletask-dotnet
that referenced
this pull request
May 7, 2026
Resolves NU1605 in downstream Azure Functions Worker isolated apps that consume Microsoft.DurableTask.Extensions.AzureBlobPayloads via Microsoft.Azure.Functions.Worker.Extensions.DurableTask.AzureManaged. Microsoft.Azure.WebJobs 3.0.45 -> Microsoft.Extensions.Logging.Abstractions 9.0.1 transitively floors Microsoft.Extensions.DependencyInjection.Abstractions at >= 9.0.1, while AzureBlobPayloads previously pinned it to 8.0.2. Auto-generated WorkerExtensions.csproj resolved 8.0.2 by 'nearest wins', triggering NU1605. The original 8.x pin (PR microsoft#698) was correct when the Functions host targeted net8.0 and could only provide 8.x shared-framework assemblies. As of azure-functions-host v4.1049.x the host targets net10.0 and ships 9.x/10.x via runtimeassemblies-relaxed.json, so this pin is no longer necessary. Bumping DI.Abstractions to 9.0.1 transitively floors Microsoft.Bcl.AsyncInterfaces at >= 9.0.1, so that package is bumped together. Fixes Azure/azure-functions-durable-extension#3433 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Bill Wang <wangbill@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Azure Functions host process runs on net8.0 (source) and loads DurableTask extension assemblies into its process. Packages like
Microsoft.Extensions.*,Microsoft.Bcl.AsyncInterfaces, andSystem.Text.Jsonare part of the .NET shared framework — the host only provides version8.0.0.0of these assemblies.PR #510 upgraded these to 10.x, causing
FileNotFoundExceptionat runtime when used as a Functions host extension:\
Could not load file or assembly 'Microsoft.Extensions.Options, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
\\
Azure Functions 'supports .NET 10' only in the isolated worker process — the host process remains net8.
Fix
Revert 11 shared-framework packages to 8.x while keeping all other upgrades (Grpc, Protobuf, Azure.Storage.Blobs, Azure.Identity, CodeAnalysis, test frameworks):
Microsoft.Extensions.Caching.MemoryMicrosoft.Extensions.Configuration.AbstractionsMicrosoft.Extensions.DependencyInjectionMicrosoft.Extensions.DependencyInjection.AbstractionsMicrosoft.Extensions.HostingMicrosoft.Extensions.Hosting.AbstractionsMicrosoft.Extensions.Logging.AbstractionsMicrosoft.Extensions.OptionsMicrosoft.Extensions.Options.DataAnnotationsMicrosoft.Bcl.AsyncInterfacesSystem.Text.JsonAdded
IMPORTANTcomment inDirectory.Packages.propsexplaining why these must stay at 8.x.Test fix
Generators.Tests.csproj(net10 test project) getsVersionOverride=\"10.0.2\"forMicrosoft.Extensions.DependencyInjectionsinceMicrosoft.Azure.Functions.Worker 2.51.0transitively needs 10.x. This is safe — test projects don't load into the Functions host.t this change also adds a VersionOverride for Microsoft.Extensions.Hosting
Validation
dotnet build -c Releaseon full solution: 0 errors, 0 warnings