NuGet/Home

Use of obsolete API for Exception constructor

Open

#12.626 geöffnet am 1. Juni 2023

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)HTML (292 Forks)batch import
Category:Quality WeekFunctionality:SDKPartner:DotNetPriority:2Type:DCRhelp wanted

Repository-Metriken

Stars
 (1.459 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 464T 23h) (1 gemergte PR in 30 T)

Beschreibung

When using the latest build of .NET 8 Preview 4 SDK to build the nuget.client repo, it results in the following analyzer error:

/vmr/src/nuget-client/src/NuGet.Core/NuGet.Frameworks/FrameworkException.cs(17,88): error SYSLIB0051: 'Exception.Exception(SerializationInfo, StreamingContext)' is obsolete: 'This API supports obsolete formatter-based serialization. It should not be called or extended by application code.' (https://aka.ms/dotnet-warnings/SYSLIB0051) [/vmr/src/nuget-client/src/NuGet.Core/NuGet.Frameworks/NuGet.Frameworks.csproj::TargetFramework=net8.0]

This was caught by the Source-build bootstrapping build workflow which uses a source-built version of the latest SDK to build the product's repos.

Contributor Guide