-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 description to RequiresPreviewFeaturesAttribute #56498
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @dotnet/area-system-runtime Issue DetailsIt would be nice if there was a way to provide a description with A description would provide more information about why a feature is in preview and what a user should keep in mind if they choose to use the feature. For example, HTTP/3 in .NET 6 is preview. Kind of detail we want to pass on when someone sees this warning:
|
@JamesNK I've added the API proposal and sample information and marked the issue as ready for review. We'll take a look next Tuesday, I'll send you an invite on Monday. |
Ok. I might not make it because of time zones, but I think the issue is pretty self explanatory. |
namespace System.Runtime.Versioning
{
public sealed class RequiresPreviewFeaturesAttribute : Attribute
{
// Existing
// public RequiresPreviewFeaturesAttribute();
public RequiresPreviewFeaturesAttribute(string? message);
public string? Message { get; }
public string? Url { get; set; }
}
} |
It would be nice if there was a way to provide a description with
RequiresPreviewFeaturesAttribute
, like you can withObsoleteAttribute
. The description would show up in analyzers/build warnings.A description would provide more information about why a feature is in preview and what a user should keep in mind if they choose to use the feature.
For example, HTTP/3 in .NET 6 is preview. Kind of detail we want to pass on when someone sees this warning:
API Proposal
Note: The URL property allows us to surface the URL directly via the Roslyn diagnostic, so that people can click the diagnostic ID in the error list, rather than copy & pasting the URL.
API Usage
The text was updated successfully, but these errors were encountered: