-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Upgrade language version fixer fails to update the correct program configuration #23342
Comments
This is likely a problem in the project system layer. The code fix just sets The strange thing is I thought that API had the opposite problem, namely it would make too many insertions (producing verbose project XML files). @gafter What version of VS are you using? Tagging @davkean |
This is using the daily preview |
The project system should update whatever configuration you set |
Here's the fixer: https://github.com/dotnet/roslyn/blob/master/src/Features/CSharp/Portable/UpgradeProject/CSharpUpgradeProjectCodeFixProvider.cs The PR, for related files: #17435 |
I can reproduce this. Not an expert in DTE usage but usage looks correct; https://github.com/dotnet/roslyn/pull/17435/files#diff-cbb8610d7833d8bed4af13328decbaebR308. I'll move it over to us. |
This issue was moved to dotnet/project-system#2985 |
This should be reopened because it was incorrectly moved, the problem is indeed on our side. See #25875 (comment) |
@Neme12 fixed this for dev16.1 preview1. Thanks! |
I have a project with the following source in it
The compiler complains
error CS8107: Feature 'default literal' is not available in C# 7.0. Please use language version 7.1 or greater.
control-. offers to update to language version
7.1
orlatest
. I accept its update tolatest
, but the error remains.Looking at the project file, it updated the wrong section. My program configuration is "Debug|x86". But the updated project file is as it appears below. As you can see the language version has not been updated in the active configuration.
/cc @jcouv
The text was updated successfully, but these errors were encountered: