Skip to content

Commit 1676b1b

Browse files
authored
Fix DataProtection dependency target mismatch (Azure#59114)
The `Microsoft.AspNetCore.DataProtection` 10.x package does not include a `net8.0` target, causing consumers of the DataProtection extension packages targeting `net8.0` to fall back to the `netstandard2.0` asset and emit dependency warnings. This adds a conditional package version override in central package management so that `Microsoft.AspNetCore.DataProtection` resolves to 8.0.26 when the target framework is `net8.0`, while continuing to use 10.0.7 for all other targets.
1 parent f14e4e6 commit 1676b1b

5 files changed

Lines changed: 15 additions & 15 deletions

File tree

eng/centralpackagemanagement/Directory.Extensions.Packages.props

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,15 @@
2323
</ItemGroup>
2424

2525
<ItemGroup Condition="'$(IsExtensionClientLibrary)' == 'true'">
26-
<PackageVersion Include="Microsoft.AspNetCore.DataProtection" Version="10.0.7" />
26+
<!--
27+
The AspNetCore.DataProtection 10.x package does not include a net8.0 target. Though the package can be used
28+
in net8.0 projects, via the netstandard2.0 path, it conflicts with the explicit net8.0 target of the Azure SDK
29+
package, causing warnings. To avoid these warnings, we use the last 8.0 version of the package for net8.0
30+
builds and the latest 10.x version for all other target frameworks.
31+
-->
32+
<PackageVersion Include="Microsoft.AspNetCore.DataProtection" Version="10.0.7" Condition="'$(TargetFramework)' != 'net8.0'" />
33+
<PackageVersion Include="Microsoft.AspNetCore.DataProtection" Version="8.0.26" Condition="'$(TargetFramework)' == 'net8.0'" />
34+
2735
<PackageVersion Include="Microsoft.AspNetCore.Http.Connections" Version="1.2.0" />
2836
<PackageVersion Include="Microsoft.Azure.Functions.Worker.Extensions.Abstractions" Version="1.3.0" />
2937
<PackageVersion Update="Microsoft.Extensions.Configuration.Abstractions" Version="$(MicrosoftExtensionsConfigurationAbstractionsVersion)" />

sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/CHANGELOG.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
# Release History
22

3-
## 1.6.0-beta.1 (Unreleased)
4-
5-
### Features Added
6-
7-
### Breaking Changes
3+
## 1.5.3 (2026-05-08)
84

95
### Bugs Fixed
106

11-
### Other Changes
7+
- Fixed a misalignment between the explicit `net8.0` target of this package and its `Microsoft.AspNetCore.DataProtection` dependency, which does not offer a `net8.0` asset in the 10.x version. The dependency now resolves to version 8.0.26 when targeting `net8.0`, ensuring consumers receive a framework-compatible asset and eliminating the associated dependency warnings.
128

139
## 1.5.2 (2026-04-28)
1410

sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Blobs/src/Azure.Extensions.AspNetCore.DataProtection.Blobs.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<TargetFrameworks>$(RequiredTargetFrameworks)</TargetFrameworks>
55
<Description>Microsoft Azure Blob storage support as key store (https://docs.microsoft.com/aspnet/core/security/data-protection/implementation/key-storage-providers).</Description>
66
<PackageTags>aspnetcore;dataprotection;azure;blob;key store</PackageTags>
7-
<Version>1.6.0-beta.1</Version>
7+
<Version>1.5.3</Version>
88
<!--The ApiCompatVersion is managed automatically and should not generally be modified manually.-->
99
<ApiCompatVersion>1.5.2</ApiCompatVersion>
1010
<IsExtensionClientLibrary>true</IsExtensionClientLibrary>

sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/CHANGELOG.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
# Release History
22

3-
## 1.7.0-beta.1 (Unreleased)
4-
5-
### Features Added
6-
7-
### Breaking Changes
3+
## 1.6.3 (2026-05-08)
84

95
### Bugs Fixed
106

11-
### Other Changes
7+
- Fixed a misalignment between the explicit `net8.0` target of this package and its `Microsoft.AspNetCore.DataProtection` dependency, which does not offer a `net8.0` asset in the 10.x version. The dependency now resolves to version 8.0.26 when targeting `net8.0`, ensuring consumers receive a framework-compatible asset and eliminating the associated dependency warnings.
128

139
## 1.6.2 (2026-04-28)
1410

sdk/extensions/Azure.Extensions.AspNetCore.DataProtection.Keys/src/Azure.Extensions.AspNetCore.DataProtection.Keys.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<TargetFrameworks>$(RequiredTargetFrameworks)</TargetFrameworks>
55
<Description>Microsoft Azure Key Vault key encryption support.</Description>
66
<PackageTags>aspnetcore;dataprotection;azure;keyvault</PackageTags>
7-
<Version>1.7.0-beta.1</Version>
7+
<Version>1.6.3</Version>
88
<!--The ApiCompatVersion is managed automatically and should not generally be modified manually.-->
99
<ApiCompatVersion>1.6.2</ApiCompatVersion>
1010
<IsExtensionClientLibrary>true</IsExtensionClientLibrary>

0 commit comments

Comments
 (0)