Skip to content

Use of obsolete API for Exception constructor #4424

@mthalman

Description

@mthalman

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

/repos/dotnet/src/vstest/artifacts/source-build/self/src/src/Microsoft.TestPlatform.AdapterUtilities/ManagedNameUtilities/InvalidManagedNameException.cs(14,93): 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) [/repos/dotnet/src/vstest/artifacts/source-build/self/src/src/Microsoft.TestPlatform.AdapterUtilities/Microsoft.TestPlatform.AdapterUtilities.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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions