-
Notifications
You must be signed in to change notification settings - Fork 390
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 NullableReferenceTypes property #4277
Conversation
Fixes adding configuration-specific property for dotnet#4058 Note: This is a configuraiton-specific property but writes itself without a configuration condition, similar to LangVersion. We need this because it's going to live on the Build property page which pulls from configuration. You can access this using DTE.Configuration.Properties["NullableReferenceTypes"]. We do not yet have a strongly typed API for it and will do that when legacy adds support for it.
tag @jcouv |
@jcouv here's an example of checking for CPS: https://github.com/dotnet/roslyn/blob/027d0f2535403ae8140d7669035956c2b1713c88/src/VisualStudio/Core/Def/Implementation/ProjectSystem/VisualStudioWorkspaceImpl.cs#L298. I have no idea how to this in a code fix. |
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.
Additionally, the configured value will automatically flow to the language service through IWorkspaceProjectContext
as it's just another commandline argument to the csc
task, right?
Yes, though I think this will be one of the things that get "evaluation" handled. |
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.
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 received this in VS 2019. The "NullableReferenceTypes" parameter is not supported by the "Csc" task. Verify the parameter exists on the task, and it is a settable public instance property. Is this related to the above? |
|
Fixes adding configuration-specific property for #4058
Note: This is a configuraiton-specific property but writes itself without a configuration condition, similar to LangVersion. We need this because it's going to live on the Build property page which pulls from configuration.
You can access this using DTE.Configuration.Properties["NullableReferenceTypes"]. We do not yet have a strongly typed API for it and will do that when legacy adds support for it.