Closed jcouv closed 7 years ago
@RaulPerez1 maybe another missing rule?
Not a property issue, this is getting read/written properly to the project. Most likely the value is not being passed to the compiler on the targets
I take that back, after some digging in the targets I found the problem. The compiler property is LangVersion and the property page is using LanguageVersion so it needs to be rerouted.
Repro:
_ = 1;
or(int, int) t = (1, 2);
)I expect to see an error about language version (
CS8059 Feature 'xyz' is not available in C# 6. Please use language version 7 or greater.
). But the discard snippet is accepted and the tuple snippet reports a missing reference to ValueTuple. I logged the build output (see line below) and it appears that no version parameter is passed in the command line parameters.Note that this problem doesn't repro with a "Console App (.NET Framework)" project. It seems specific to "Console App (.NET Core)".