Skip to content

Commit

Permalink
Dual-targeting .NET 8 and 9.
Browse files Browse the repository at this point in the history
  • Loading branch information
artempushkin committed Nov 26, 2024
1 parent b1ae1f1 commit 1ee5339
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</PropertyGroup>

<PropertyGroup Label="Target Platforms" >
<LatestSupportedDotNetVersion>net8.0</LatestSupportedDotNetVersion>
<LatestSupportedDotNetVersion>net9.0</LatestSupportedDotNetVersion>
<OldestSupportedDotNetVersion>net8.0</OldestSupportedDotNetVersion>
<NetCoreVersions>$(LatestSupportedDotNetVersion)</NetCoreVersions>
<NetCoreVersions Condition="'$(LatestSupportedDotNetVersion)' != '$(OldestSupportedDotNetVersion)'">$(LatestSupportedDotNetVersion);$(OldestSupportedDotNetVersion)</NetCoreVersions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,12 @@ public async Task CheckHealthAsync_ShouldReturnUnhealthy_WhenCertificateNotYetVa
[TestMethod]
public async Task CheckHealthAsync_ShouldReturnUnhealthy_WhenCertificateDoesNotHavePrivateKey()
{
#if NET9_0
X509Certificate2 certWithoutPrivateKey = X509CertificateLoader.LoadCertificate(CreateCert(m_certSubjectName).Export(X509ContentType.Cert));
#else
X509Certificate2 certWithoutPrivateKey = new(CreateCert(m_certSubjectName).Export(X509ContentType.Cert));
#endif

m_certificateReaderMock.Setup(m => m.GetCertificateByCommonName(It.IsAny<string>(), It.IsAny<bool>(), It.IsAny<StoreName>()))
.Returns(certWithoutPrivateKey);

Expand Down

0 comments on commit 1ee5339

Please sign in to comment.