C# v10 not available in Rider 2023.2.2 #file-scoped namespaces

181 views Asked by At

After generating a project i .NET7 CLI, I got an error in Jetbrains Rider "Feature 'file-scoped namespaces' is not available. Please use language version 10.0 or greater. enter image description here

I tried to change the language version, but in project properties, I haven't an option of 10.0. I've upgraded Rider to 2023.2.2 build #RD-232.9921.83, Sep 24, 2023 - which is currently the highest release version of Rider IDE - but the problem still persists. enter image description here enter image description here

1

There are 1 answers

0
michael112 On

Adding

<LangVersion>10.0</LangVersion>

in .csproj file has solved the problem.