Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/260.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Rider建议使用C#8语法,但未能构建解决方案_C#_Resharper_Rider - Fatal编程技术网

Rider建议使用C#8语法,但未能构建解决方案

Rider建议使用C#8语法,但未能构建解决方案,c#,resharper,rider,C#,Resharper,Rider,Rider建议使用C#8语法,例如or 然而,当我应用推荐的重构时,构建会因语法错误而失败 我的csproj.DotSettings文件包含设置为latest的语言级别: <wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="ur

Rider建议使用C#8语法,例如or

然而,当我应用推荐的重构时,构建会因语法错误而失败

我的
csproj.DotSettings
文件包含设置为
latest
的语言级别:

<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
    <s:String x:Key="/Default/CodeInspection/CSharpLanguageProject/LanguageLevel/@EntryValue">latest</s:String>
...
</wpf:ResourceDictionary>

最新的
...
澄清一下——我完全支持使用C#8。在哪里可以设置编译器目标语言?或者它可能还没有得到支持

在我的项目属性中:

要使用C#8,您需要安装MSBuild 16,然后在项目设置(csproj)中写入该语言的确切版本


...
8.
</PropertyGroup>
  ...
  <LangVersion>8</LangVersion>
</PropertyGroup>