Use of Obsolete X509Certificate2 ctor
ellahathaway opened this issue · comments
NuGet Product Used
nuget-client in dotnet VMR latest build
Repro Steps & Context
The source-build VMR build is failing in stage 2 with the following error:
/vmr/src/nuget-client/src/NuGet.Core/NuGet.Configuration/Settings/Items/FileClientCertItem.cs(170,66): error SYSLIB0057: 'X509Certificate2.X509Certificate2(string)' is obsolete: 'Loading certificate data through the constructor or Import is obsolete. Use X509CertificateLoader instead to load certificates.' (https://aka.ms/dotnet-warnings/SYSLIB0057) [/vmr/src/nuget-client/src/NuGet.Core/NuGet.Configuration/NuGet.Configuration.csproj]
This error is caused by dotnet/runtime#104165
This issue is also described in dotnet/source-build#4495.