-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Add deprecation warning to Microsoft.Extensions.ApiDescription.Client MSBuild package #62646
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
Add deprecation warning to Microsoft.Extensions.ApiDescription.Client MSBuild package #62646
Conversation
…on.Client Co-authored-by: captainsafia <[email protected]>
.../Extensions.ApiDescription.Client/src/build/Microsoft.Extensions.ApiDescription.Client.props
Outdated
Show resolved
Hide resolved
.../Extensions.ApiDescription.Client/src/build/Microsoft.Extensions.ApiDescription.Client.props
Outdated
Show resolved
Hide resolved
Co-authored-by: captainsafia <[email protected]>
Co-authored-by: captainsafia <[email protected]>
|
||
<!-- Emit deprecation warning for this package --> | ||
<Target Name="_WarnMicrosoftExtensionsApiDescriptionClientDeprecated" BeforeTargets="BeforeCompile;Build;Restore"> | ||
<Warning Code="ASPDEPR001" Text="The 'Microsoft.Extensions.ApiDescription.Client' package is deprecated and will be removed in a future release." HelpLink="https://aka.ms/aspnet/deprecate/001" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just verifying, this can be suppressed with <NoWarn>$(NoWarn);ASPDEPR001</NoWarn>
in the project file, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep -- NoWarn will work now that we have a code for this.
This PR adds a compile-time deprecation warning to the
Microsoft.Extensions.ApiDescription.Client
MSBuild package to inform users that the package is deprecated and will be removed in a future release.Changes Made
build/Microsoft.Extensions.ApiDescription.Client.props
Warning Message
When developers build projects that reference this package, they will now see:
Implementation Details
The warning is implemented as an MSBuild target that executes before the
BeforeCompile
,Build
, andRestore
targets:Testing
This change provides clear communication to developers about the package's deprecation status while maintaining backward compatibility.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.