Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of obsolete API for Exception constructor #4424

Closed
mthalman opened this issue Apr 27, 2023 · 3 comments · Fixed by #4440
Closed

Use of obsolete API for Exception constructor #4424

mthalman opened this issue Apr 27, 2023 · 3 comments · Fixed by #4440

Comments

@mthalman
Copy link
Member

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.

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage This item should be discussed in the next triage meeting. label Apr 27, 2023
@Evangelink
Copy link
Member

@vitek-karas We are multi-targetting our builds to the various tfms. What's the recommended approach here? Shall we exclude all serialization exception ctors for NET8+? Shall we start before that? Shall we ignore this issue at the moment?

@Evangelink Evangelink added engineering needs-attention and removed needs-triage This item should be discussed in the next triage meeting. labels Apr 28, 2023
@Evangelink Evangelink self-assigned this Apr 28, 2023
@vitek-karas
Copy link
Member

@GrabYourPitchforks should know what to do.

@Evangelink
Copy link
Member

This issue dotnet/docs#34893 contains all the informations about how to be fixing this issue properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants