Skip to content

Commit 19753e7

Browse files
Copilotpmaytak
andauthored
Update to .NET 10 GA (#226)
* Initial plan * chore: Update NuGet config to include nuget.org fallback Co-authored-by: pmaytak <[email protected]> * feat: Update to .NET 10 GA Co-authored-by: pmaytak <[email protected]> * fix: Add missing PublicAPI entries for net10.0 Co-authored-by: pmaytak <[email protected]> * refactor: Use global.json for .NET version in GitHub Actions Co-authored-by: pmaytak <[email protected]> * fix: Use X509CertificateLoader for .NET 10 to resolve SYSLIB0057 warning Co-authored-by: pmaytak <[email protected]> * Fixes. --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: pmaytak <[email protected]>
1 parent f9bac31 commit 19753e7

File tree

12 files changed

+151
-135
lines changed

12 files changed

+151
-135
lines changed

.github/workflows/dotnetcore.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,32 @@ name: .NET Core
22

33
on: [push]
44

5+
env:
6+
TargetNetNext: False
7+
58
jobs:
69
build:
710
runs-on: windows-latest
811
continue-on-error: true
9-
name: Abstractions GitHub Action Test
12+
name: Run tests and pack
1013
steps:
1114
- name: Checkout repository
12-
uses: actions/checkout@v5
15+
uses: actions/checkout@v5
16+
17+
- name: Use .NET version from global.json
18+
uses: actions/setup-dotnet@v5
19+
with:
20+
global-json-file: global.json
21+
1322
- name: Setup .NET 8.0.x
1423
uses: actions/setup-dotnet@v5
1524
with:
1625
dotnet-version: 8.0.x
1726

1827
# Run the tests
19-
- name: Build with .NET 8.0.x
20-
run: dotnet test -v m --configuration Release Microsoft.Identity.Abstractions.sln
21-
22-
- name: Setup .NET 10.0.100-rc.1
23-
uses: actions/setup-dotnet@v5
24-
with:
25-
dotnet-version: 10.0.100-rc.1.25451.107
26-
27-
# Run the tests
28-
- name: Build with .NET 10.0.100-rc.1
29-
run: dotnet test -p:TargetNetNext=True -v m --configuration Release Microsoft.Identity.Abstractions.sln
28+
- name: Build and test
29+
run: dotnet test -p:TargetNetNext=${{ env.TargetNetNext }} -v m --configuration Release Microsoft.Identity.Abstractions.sln
3030

3131
# Pack the library
3232
- name: Pack
33-
run: dotnet pack -p:TargetNetNext=True --configuration Release --no-restore --no-build -v m Microsoft.Identity.Abstractions.sln
33+
run: dotnet pack -p:TargetNetNext=${{ env.TargetNetNext }} --configuration Release --no-restore --no-build -v m Microsoft.Identity.Abstractions.sln

Directory.Build.props

Lines changed: 87 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,97 @@
11
<Project>
2-
<PropertyGroup>
3-
<!-- This should be passed from the VSTS build -->
4-
<MicrosoftIdentityAbstractionsVersion Condition="'$(MicrosoftIdentityAbstractionsVersion)' == ''">9.5.0</MicrosoftIdentityAbstractionsVersion>
5-
<!-- This will generate AssemblyVersion, AssemblyFileVersion and AssemblyInformationVersion -->
6-
<Version>$(MicrosoftIdentityAbstractionsVersion)</Version>
7-
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)\build\35MSSharedLib1024.snk</AssemblyOriginatorKeyFile>
8-
<RepositoryType>git</RepositoryType>
9-
<Authors>Microsoft</Authors>
10-
<Company>Microsoft Corporation</Company>
11-
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
12-
<PackageLicenseExpression>MIT</PackageLicenseExpression>
13-
<PackageProjectUrl>https://github.com/AzureAD/microsoft-identity-abstractions-for-dotnet</PackageProjectUrl>
14-
<RepositoryUrl>https://github.com/AzureAD/microsoft-identity-abstractions-for-dotnet</RepositoryUrl>
15-
<PackageReleaseNotes>The release notes are available at https://github.com/AzureAD/microsoft-identity-abstractions-for-dotnet/releases and the roadmap at https://github.com/AzureAD/microsoft-identity-abstractions-for-dotnet/wiki#roadmap </PackageReleaseNotes>
16-
<PackageTags>Microsoft Identity Abstractions for dotnet;Microsoft identity platform;Microsoft Identity Web;.NET;ASP.NET Core;Web App;Web API;B2C;Azure Active Directory;AAD;Identity;Authentication;Authorization</PackageTags>
17-
<DefineConstants>$(DefineConstants);WEB</DefineConstants>
18-
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
19-
</PropertyGroup>
20-
21-
<!-- TargetNetNext must be set to True to build/test with NET 10.0 locally, you can uncomment this PropertyGroup or set TargetNetNext it in a CLI arg (`/p:TargetNetNext=true`), or set an environment
22-
variable (`Set TargetNetNext=true`) -->
23-
<!-- <TargetNetNext>True</TargetNetNext>
24-
</PropertyGroup> -->
2+
<PropertyGroup>
3+
<!-- This should be passed from the VSTS build -->
4+
<MicrosoftIdentityAbstractionsVersion Condition="'$(MicrosoftIdentityAbstractionsVersion)' == ''">9.5.0</MicrosoftIdentityAbstractionsVersion>
5+
<!-- This will generate AssemblyVersion, AssemblyFileVersion and AssemblyInformationVersion -->
6+
<Version>$(MicrosoftIdentityAbstractionsVersion)</Version>
7+
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)\build\35MSSharedLib1024.snk</AssemblyOriginatorKeyFile>
8+
<RepositoryType>git</RepositoryType>
9+
<Authors>Microsoft</Authors>
10+
<Company>Microsoft Corporation</Company>
11+
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
12+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
13+
<PackageProjectUrl>https://github.com/AzureAD/microsoft-identity-abstractions-for-dotnet</PackageProjectUrl>
14+
<RepositoryUrl>https://github.com/AzureAD/microsoft-identity-abstractions-for-dotnet</RepositoryUrl>
15+
<PackageReleaseNotes>The release notes are available at https://github.com/AzureAD/microsoft-identity-abstractions-for-dotnet/releases and the roadmap at https://github.com/AzureAD/microsoft-identity-abstractions-for-dotnet/wiki#roadmap </PackageReleaseNotes>
16+
<PackageTags>Microsoft Identity Abstractions for dotnet;Microsoft identity platform;Microsoft Identity Web;.NET;ASP.NET Core;Web App;Web API;B2C;Azure Active Directory;AAD;Identity;Authentication;Authorization</PackageTags>
17+
<DefineConstants>$(DefineConstants);WEB</DefineConstants>
18+
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
19+
</PropertyGroup>
2520

26-
<PropertyGroup Condition="'$(TargetNetNext)' == 'True'">
27-
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
28-
<CheckEolTargetFramework>false</CheckEolTargetFramework>
29-
<!-- For NU5104 it prevents us from packing release packages with prerelease dependencies. But we want to do that so customers can get a preview of running with .NET 10. -->
30-
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU5104</WarningsNotAsErrors>
31-
<NoWarn>$(NoWarn);NU5104</NoWarn>
32-
</PropertyGroup>
21+
<!-- TargetNetNext must be set to True to build/test with .NET preview versions locally, you can uncomment this PropertyGroup or set TargetNetNext it in a CLI arg (`/p:TargetNetNext=true`), or set an environment
22+
variable (`Set TargetNetNext=true`)
23+
<PropertyGroup>
24+
<TargetNetNext>True</TargetNetNext>
25+
</PropertyGroup> -->
3326

34-
<PropertyGroup>
35-
<TargetFrameworks>netstandard2.0;netstandard2.1;net462;net8.0;net9.0</TargetFrameworks>
36-
<TargetFrameworks Condition="'$(TargetNetNext)' == 'True'">$(TargetFrameworks);net10.0</TargetFrameworks>
37-
<SignAssembly>true</SignAssembly>
38-
<AssemblyOriginatorKeyFile>../../build/MSAL.snk</AssemblyOriginatorKeyFile>
39-
<GenerateDocumentationFile>true</GenerateDocumentationFile>
40-
<Nullable>enable</Nullable>
41-
<LangVersion>12</LangVersion>
42-
<EnablePackageValidation>true</EnablePackageValidation>
43-
<PackageValidationBaselineVersion>8.0.0</PackageValidationBaselineVersion>
44-
<BannedApiAnalyzersVersion>4.14.0</BannedApiAnalyzersVersion>
45-
<MicrosoftCodeAnalysisPublicApiAnalyzers>4.14.0</MicrosoftCodeAnalysisPublicApiAnalyzers>
46-
<MicrosoftCodeAnalysisNetAnalyzersVersion>8.0.0</MicrosoftCodeAnalysisNetAnalyzersVersion>
47-
</PropertyGroup>
27+
<PropertyGroup Condition="'$(TargetNetNext)' == 'True'">
28+
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
29+
<CheckEolTargetFramework>false</CheckEolTargetFramework>
30+
<!-- For NU5104 it prevents us from packing release packages with prerelease dependencies. But we want to do that so customers can get a preview of running with .NET 10. -->
31+
<WarningsNotAsErrors>$(WarningsNotAsErrors);NU5104</WarningsNotAsErrors>
32+
<NoWarn>$(NoWarn);NU5104</NoWarn>
33+
</PropertyGroup>
4834

49-
<PropertyGroup Label="Source Link">
50-
<PublishRepositoryUrl>true</PublishRepositoryUrl>
51-
<EmbedUntrackedSources>true</EmbedUntrackedSources>
52-
<!-- Build symbol package (.snupkg) to distribute the PDB containing Source Link -->
53-
<IncludeSymbols>true</IncludeSymbols>
54-
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
55-
<!-- The MSAL.snk has both private and public keys -->
56-
<DelaySign>false</DelaySign>
57-
<EnableNETAnalyzers>true</EnableNETAnalyzers>
58-
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
59-
</PropertyGroup>
60-
61-
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
62-
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
63-
</PropertyGroup>
35+
<PropertyGroup>
36+
<TargetFrameworks>netstandard2.0;netstandard2.1;net462;net8.0;net9.0;net10.0</TargetFrameworks>
37+
<TargetFrameworks Condition="'$(TargetNetNext)' == 'True'">$(TargetFrameworks);</TargetFrameworks>
38+
<SignAssembly>true</SignAssembly>
39+
<AssemblyOriginatorKeyFile>../../build/MSAL.snk</AssemblyOriginatorKeyFile>
40+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
41+
<Nullable>enable</Nullable>
42+
<LangVersion>12</LangVersion>
43+
<EnablePackageValidation>true</EnablePackageValidation>
44+
<PackageValidationBaselineVersion>8.0.0</PackageValidationBaselineVersion>
45+
<BannedApiAnalyzersVersion>4.14.0</BannedApiAnalyzersVersion>
46+
<MicrosoftCodeAnalysisPublicApiAnalyzers>4.14.0</MicrosoftCodeAnalysisPublicApiAnalyzers>
47+
<MicrosoftCodeAnalysisNetAnalyzersVersion>8.0.0</MicrosoftCodeAnalysisNetAnalyzersVersion>
48+
</PropertyGroup>
6449

65-
<ItemGroup>
66-
<None Include="..\..\LICENSE">
67-
<Pack>True</Pack>
68-
<PackagePath />
69-
</None>
70-
</ItemGroup>
50+
<PropertyGroup Label="Source Link">
51+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
52+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
53+
<!-- Build symbol package (.snupkg) to distribute the PDB containing Source Link -->
54+
<IncludeSymbols>true</IncludeSymbols>
55+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
56+
<!-- The MSAL.snk has both private and public keys -->
57+
<DelaySign>false</DelaySign>
58+
<EnableNETAnalyzers>true</EnableNETAnalyzers>
59+
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
60+
</PropertyGroup>
7161

72-
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
73-
<Reference Include="System.Net.Http" />
74-
</ItemGroup>
62+
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
63+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
64+
</PropertyGroup>
7565

76-
<ItemGroup Label="Build Tools"
77-
Condition="$([MSBuild]::IsOsPlatform('Windows'))">
78-
<PackageReference Include="Microsoft.SourceLink.GitHub"
79-
Version="1.0.0"
80-
PrivateAssets="All" />
81-
</ItemGroup>
66+
<ItemGroup>
67+
<None Include="..\..\LICENSE">
68+
<Pack>True</Pack>
69+
<PackagePath />
70+
</None>
71+
</ItemGroup>
8272

83-
<ItemGroup>
84-
<!-- Protects against sync-over-async: https://github.com/microsoft/vs-threading/blob/main/doc/analyzers/index.md. -->
85-
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers"
86-
Version="17.11.20"
87-
PrivateAssets="all" />
73+
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
74+
<Reference Include="System.Net.Http" />
75+
</ItemGroup>
8876

89-
<!-- Help understand public API changes -->
90-
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers"
91-
Version="$(MicrosoftCodeAnalysisPublicApiAnalyzers)">
92-
<PrivateAssets>all</PrivateAssets>
93-
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
94-
</PackageReference>
95-
</ItemGroup>
77+
<ItemGroup Label="Build Tools"
78+
Condition="$([MSBuild]::IsOsPlatform('Windows'))">
79+
<PackageReference Include="Microsoft.SourceLink.GitHub"
80+
Version="1.0.0"
81+
PrivateAssets="All" />
82+
</ItemGroup>
83+
84+
<ItemGroup>
85+
<!-- Protects against sync-over-async: https://github.com/microsoft/vs-threading/blob/main/doc/analyzers/index.md. -->
86+
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers"
87+
Version="17.11.20"
88+
PrivateAssets="all" />
89+
90+
<!-- Help understand public API changes -->
91+
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers"
92+
Version="$(MicrosoftCodeAnalysisPublicApiAnalyzers)">
93+
<PrivateAssets>all</PrivateAssets>
94+
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
95+
</PackageReference>
96+
</ItemGroup>
9697
</Project>

Microsoft.Identity.Abstractions.sln

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 17
4-
VisualStudioVersion = 17.3.32505.426
3+
# Visual Studio Version 18
4+
VisualStudioVersion = 18.0.11205.157 d18.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Identity.Abstractions", "src\Microsoft.Identity.Abstractions\Microsoft.Identity.Abstractions.csproj", "{98F57CC8-01A0-49F3-B859-DDC4F8F5CD2F}"
77
EndProject
@@ -11,6 +11,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1111
agents.md = agents.md
1212
.github\copilot-instructions.md = .github\copilot-instructions.md
1313
Directory.Build.props = Directory.Build.props
14+
global.json = global.json
1415
NuGet.config = NuGet.config
1516
README.md = README.md
1617
EndProjectSection

build/template-install-dotnet-core.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44
steps:
55

66
- task: UseDotNet@2
7-
displayName: 'Use .Net Core SDK 10.0.100-rc.1'
8-
condition: eq(variables['TargetNetNext'], 'True')
7+
displayName: 'Use .NET version from global.json'
98
inputs:
10-
version: 10.0.100-rc.1.25451.107
9+
useGlobalJson: true
1110

1211
- task: UseDotNet@2
13-
displayName: 'Use .Net Core SDK 8'
12+
displayName: 'Use .NET 8 SDK'
1413
inputs:
1514
version: 8.0.x

global.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"sdk": {
3+
"version": "10.0.100",
4+
"allowPrerelease": false,
5+
"rollForward": "latestFeature"
6+
}
7+
}

src/Microsoft.Identity.Abstractions/PublicAPI/net10.0/PublicAPI.Shipped.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ Microsoft.Identity.Abstractions.AcquireTokenResult
3939
Microsoft.Identity.Abstractions.AcquireTokenResult.AccessToken.get -> string?
4040
Microsoft.Identity.Abstractions.AcquireTokenResult.AccessToken.set -> void
4141
Microsoft.Identity.Abstractions.AcquireTokenResult.AcquireTokenResult(string! accessToken, System.DateTimeOffset expiresOn, string! tenantId, string! idToken, System.Collections.Generic.IEnumerable<string!>! scopes, System.Guid correlationId, string! tokenType) -> void
42+
Microsoft.Identity.Abstractions.AcquireTokenResult.AdditionalResponseParameters.get -> System.Collections.Generic.IReadOnlyDictionary<string!, string!>?
43+
Microsoft.Identity.Abstractions.AcquireTokenResult.AdditionalResponseParameters.set -> void
44+
Microsoft.Identity.Abstractions.AcquireTokenResult.BindingCertificate.get -> System.Security.Cryptography.X509Certificates.X509Certificate2?
45+
Microsoft.Identity.Abstractions.AcquireTokenResult.BindingCertificate.set -> void
4246
Microsoft.Identity.Abstractions.AcquireTokenResult.CorrelationId.get -> System.Guid
4347
Microsoft.Identity.Abstractions.AcquireTokenResult.CorrelationId.set -> void
4448
Microsoft.Identity.Abstractions.AcquireTokenResult.ExpiresOn.get -> System.DateTimeOffset
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
#nullable enable
22
Microsoft.Identity.Abstractions.IAuthorizationHeaderProvider2
3-
Microsoft.Identity.Abstractions.IAuthorizationHeaderProvider2.CreateAuthorizationHeaderBoundAsync(System.Collections.Generic.IEnumerable<string!>! scopes, Microsoft.Identity.Abstractions.AuthorizationHeaderProviderOptions? options = null, System.Security.Claims.ClaimsPrincipal? claimsPrincipal = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.Identity.Abstractions.AuthorizationHeaderInformation!>!
4-
Microsoft.Identity.Abstractions.IAuthorizationHeaderProvider2.CreateAuthorizationHeaderBoundForAppAsync(string! scopes, Microsoft.Identity.Abstractions.AuthorizationHeaderProviderOptions? downstreamApiOptions = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.Identity.Abstractions.AuthorizationHeaderInformation!>!
5-
Microsoft.Identity.Abstractions.IAuthorizationHeaderProvider2.CreateAuthorizationHeaderBoundForUserAsync(System.Collections.Generic.IEnumerable<string!>! scopes, Microsoft.Identity.Abstractions.AuthorizationHeaderProviderOptions? authorizationHeaderProviderOptions = null, System.Security.Claims.ClaimsPrincipal? claimsPrincipal = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) -> System.Threading.Tasks.Task<Microsoft.Identity.Abstractions.AuthorizationHeaderInformation!>!

test/Directory.Build.props

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
<Project>
22

3-
<PropertyGroup>
4-
<GenerateDocumentationFile>false</GenerateDocumentationFile>
5-
</PropertyGroup>
3+
<PropertyGroup>
4+
<GenerateDocumentationFile>false</GenerateDocumentationFile>
5+
</PropertyGroup>
66

7-
<!-- TargetNetNext must be set to True to build/test with NET 10.0 locally, you can uncomment this PropertyGroup or set TargetNetNext it in a CLI arg (`/p:TargetNetNext=true`), or set an environment
8-
variable (`Set TargetNetNext=true`) -->
9-
<!-- <TargetNetNext>True</TargetNetNext>
10-
</PropertyGroup> -->
7+
<PropertyGroup>
8+
<MicrosoftNetTestSdkVersion>18.0.0</MicrosoftNetTestSdkVersion>
9+
<!-- GHSA-5crp-9r3c-p9vr - Updated to 13.0.3 for .NET 10 compatibility -->
10+
<NewtonsoftJsonVersion>13.0.3</NewtonsoftJsonVersion>
11+
<XunitVersion>2.9.3</XunitVersion>
12+
<XunitRunnerVisualStudioVersion>2.8.2</XunitRunnerVisualStudioVersion>
13+
<CoverletCollectorVersion>6.0.4</CoverletCollectorVersion>
14+
</PropertyGroup>
1115

12-
<PropertyGroup>
13-
<MicrosoftNetTestSdkVersion>18.0.0</MicrosoftNetTestSdkVersion>
14-
<!-- GHSA-5crp-9r3c-p9vr - Updated to 13.0.3 for .NET 10 compatibility -->
15-
<NewtonsoftJsonVersion>13.0.3</NewtonsoftJsonVersion>
16-
<XunitVersion>2.9.3</XunitVersion>
17-
<XunitRunnerVisualStudioVersion>2.8.2</XunitRunnerVisualStudioVersion>
18-
<CoverletCollectorVersion>6.0.4</CoverletCollectorVersion>
19-
</PropertyGroup>
16+
<!-- TargetNetNext must be set to True to build/test with .NET preview versions locally, you can uncomment this PropertyGroup or set TargetNetNext it in a CLI arg (`/p:TargetNetNext=true`), or set an environment
17+
variable (`Set TargetNetNext=true`)
18+
<PropertyGroup>
19+
<TargetNetNext>True</TargetNetNext>
20+
</PropertyGroup> -->
2021

21-
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
22-
<Reference Include="System.Net.Http" />
23-
</ItemGroup>
22+
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
23+
<Reference Include="System.Net.Http" />
24+
</ItemGroup>
2425

2526
</Project>

test/Microsoft.Identity.Abstractions.Tests/CredentialDescriptionIdTest.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,11 @@ public void DisplayCredentialDescriptionIdsForAllSourceTypes()
3838
new CredentialDescription
3939
{
4040
SourceType = CredentialSource.Certificate,
41+
#if NET10_0_OR_GREATER
42+
Certificate = X509CertificateLoader.LoadCertificate(Convert.FromBase64String(base64encoded)), // "path/to/certificate.pfx"
43+
#else
4144
Certificate = new X509Certificate2(Convert.FromBase64String(base64encoded)), // "path/to/certificate.pfx"
45+
#endif
4246
CertificatePassword = "password"
4347
}
4448
},

0 commit comments

Comments
 (0)