Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix C# language level override with "latest" #871

Merged
merged 1 commit into from
Oct 31, 2018

Conversation

citizenmatt
Copy link
Member

It was incorrectly treating this as though it were "default", and trying to apply heuristics. It now correctly treats this as "latest", e.g. C# 7.3 at time of going to press.

It was incorrectly treating this as though it were "default", and trying to apply heuristics.  It now correctly treats this as "latest", e.g. C# 7.3 at time of going to press.
@citizenmatt citizenmatt added this to the Rider 2018.3 milestone Oct 30, 2018
@citizenmatt citizenmatt self-assigned this Oct 30, 2018
@citizenmatt
Copy link
Member Author

The Travis builds completed successfully, but didn't update their statuses. Oh well. Merging!

@citizenmatt citizenmatt merged commit dc34be4 into 183 Oct 31, 2018
@citizenmatt citizenmatt deleted the bugfix/langversion-latest branch October 31, 2018 00:15
@benoit-dubreuil
Copy link

It still happens in the latest Rider 2020.2 version. I accidentally clicked on reset and can't undo that, so Rider would automatically select the right C# version. So, when I try to select C# version 7.3, it automatically switches to the C# latest minor (latest) either at the same time or a few seconds / minutes later (try typing analyzing the code or typing a line or two).

It is frustrating, as it suggests code changes related to C# 8.0 and this version isn't supported in Unity.

@van800
Copy link
Member

van800 commented Aug 17, 2020

What is your setup (Unity version, Rider version, OS)?
Please attach logs from Help->Collect Logs.
If you have a *.dotSettings file near sln, please attach it also.
@benoit-dubreuil

@benoit-dubreuil
Copy link

Unity : 2019.4.3f1
Rider : 2020.2
OS : Windows 10 Home - 64-bit

rider-logs-20200817-135947.zip

dotSettings.zip

I noticed my problem (the consequence, not the cause) is in the file EditMode.csproj.DotSettings, more specifically the line :
<s:String x:Key="/Default/CodeInspection/CSharpLanguageProject/LanguageLevel/@EntryValue">Default</s:String></wpf:ResourceDictionary>

I deleted that file and it fixed my problem but it's still a bug as far as I know.

@van800
Copy link
Member

van800 commented Aug 17, 2020

I wonder how that setting was introduced. Do you remember adding it? Is it in your vcs or only locally?

@benoit-dubreuil
Copy link

benoit-dubreuil commented Aug 17, 2020

I wonder how that setting was introduced.

Step1
Step2

Do you remember adding it?

Yes. I clicked on the reset button shown on the previous image because I was testing C# 8.0 features.

Is it in your vcs or only locally?

Only locally.

@van800
Copy link
Member

van800 commented Aug 17, 2020

Thanks! I have started internal discussion https://jetbrains.slack.com/archives/C53QFRZ7G/p1597695558405100

@van800
Copy link
Member

van800 commented Aug 17, 2020

Request opened https://youtrack.jetbrains.com/issue/RIDER-49393

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

Successfully merging this pull request may close these issues.

3 participants