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

Add NullableReferenceTypes property #4277

Merged
merged 2 commits into from
Dec 3, 2018
Merged

Conversation

davkean
Copy link
Member

@davkean davkean commented Nov 15, 2018

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.

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.
@davkean davkean requested a review from a team as a code owner November 15, 2018 10:11
@davkean
Copy link
Member Author

davkean commented Nov 15, 2018

tag @jcouv

@davkean
Copy link
Member Author

davkean commented Nov 15, 2018

@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.

Copy link
Member

@Pilchie Pilchie left a 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?

@davkean
Copy link
Member Author

davkean commented Nov 15, 2018

Yes, though I think this will be one of the things that get "evaluation" handled.

@jcouv jcouv added this to the 16.0 milestone Nov 15, 2018
Copy link
Contributor

@jmarolf jmarolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Copy link
Contributor

@jjmew jjmew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@davkean davkean merged commit 07f9d40 into dotnet:master Dec 3, 2018
@davkean davkean deleted the Nullable branch December 3, 2018 00:45
@KenFoskeyInfo
Copy link

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?

@chucker
Copy link

chucker commented Dec 19, 2018

@KenFoskeyInfo

  • is this in an SDK-style project?
  • did you set LangVersion to 8.0?

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

Successfully merging this pull request may close these issues.

9 participants