-
Notifications
You must be signed in to change notification settings - Fork 391
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
Setting CSharpProjectConfigurationProperties3.LanguageVersion creates verbose XML in project file #2732
Comments
There's really two bugs; one for the legacy and one for new project system. New project system, let's just make langversion a non-config property. Easy peasy. |
The setting is also on a config-based page so we'd need to think about that as well./ |
I wish the build properties page opened to show all configurations by default, and thus any change made would first remove all conditional |
That's an interesting idea - perhaps we have a way of setting "all configs" and just not condition the property when you set that. |
The same would be very helpful for |
My original request was specifically related to the new csproj file format. You guys did such an amazing job with that new format that I've happily spent time rewriting all old csproj files in my code to the new format. So - personally - I don't much care what happens with legacy projects 😉 (I appreciate you have to look at a much bigger picture than me though and so will need to address both scenarios) |
Even if I select 'All Configurations' before changing the language version, I get the conditional duplication defined in the OP (new project system, haven't tried old). Shouldn't this define it once for all configurations, rather than N times for each current configuration? |
Yes that's one of the proposal aboves. Legacy project system has always had this behavior - and the new project system kinda mirrored it. We should fix that. |
Gotta say I'd prefer the energy be put into allowing winforms projects to use the new sdk so I can just get off the legacy sdk altogether :D |
Note: a number of users reported pain with this setting being per-configuration (see comments in dotnet/roslyn#21783 (comment)). |
Will this likely be fixed any time soon? As @davkean says, it ought to be easy to fix for the new project file format, but six months later it's still doing it the messy way. |
@DavidArno We're focusing on bugs that affect inner loop and those without workarounds. While annoying, this is a once per project change that has an easy workaround to simplify resulting comparison. |
@davkean Aren't all configuration-specific options also possible to be set independently of configuration? If that's the case, the ConfigurationManager API could have a special property (maybe |
Fixes: dotnet#2732 for the new project system.
Note: AllowUsafeBlocks could use this fix as well (dotnet/roslyn#25875) |
AllowUnsafeBlocks requires a UI change - it's prominent (as opposed to langversion which is behind Advanced) on a configuration-specific page. I'd prefer tracking that as a separate bug. |
LangVersion is now configuration-agnostic for the new project system (SDK-based projects). This change will first appear in 15.8 Preview 2. |
@Neme12 Can you please file new bugs for any other properties that you feel fall into the same bucket? |
Correction - it will be in Preview 3 at this point. |
Tom's triage notes: Recommend we just close the issue. |
We have decided to not address this in the legacy project system. Closing. |
I still have this problem where even after adding latest C# compilerTools its still not using the latest C# compilers for ASP MVC 5 project on 4.8 |
The UpgradeProject code fixer produces a lot of "fluff" in the project file:
I would expect a single
<LangVersion>latest</LangVersion>
to be added to the standard, non-conditional,<PropertyGroup/>
instead.Thanks @DavidArno for reporting this. Also FYI @jnm2 @BillWagner
The text was updated successfully, but these errors were encountered: