问题描述
对于这个问题,我在解决方案中有很多项目,我不想创建每个项目的 dotsettings
文件.谁能帮我在解决方案级别设置 C# 语言级别.
Further to this question, I have lots of projects inside a solution and I dont want to create a dotsettings
file for each project. Can anyone help me set the C# Language Level on a solution level.
这对我很重要,因为我今天下载了 VS2015 和 ReSharper正在为我提供基于 C# 6 的有用重构建议,我的项目使用 C#5.
This is relevant for me as I downloaded VS2015 today and ReSharper is offering me useful refactor suggestions based on targeting C# 6 and my projects are using C#5.
推荐答案
我在 .sln.DotSettings
中添加了以下设置
I added below settings in .sln.DotSettings
<s:String x:Key="/Default/CodeInspection/CSharpLanguageProject/LanguageLevel/@EntryValue">CSharp50</s:String>
当我尝试为特定项目禁用 c#6 时,此行被添加到 .csproj.DotSettings
.在 .sln.DotSettings
中添加此行后,每当我尝试使用 c# 6.0 功能时,resharper 都会报告错误.
This line was added to .csproj.DotSettings
when I tried to disable c#6 for a particular project. After adding this line in .sln.DotSettings
resharper is reporting an error whenever I am trying to use c# 6.0 feature.
这篇关于ReSharper:为解决方案设置 C# 语言级别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!