Skip to content

Obsolete API error when building in source-build #12988

@NikolaMilosavljevic

Description

@NikolaMilosavljevic

When building nuget.client repo in full product source-build we see the following 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]

To work around this, source-build process have been modifying Directory.Build.props during build to add a nowarn for SYSLIB0051. We are moving away from modifying sources during source-build and this needs to be fixed in the repo.

I will be creating a PR to fix this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions