Browse Source

Proper configuration to pick up C# 8.0.

Bart De Smet 6 years ago
parent
commit
e86510b734
1 changed files with 6 additions and 1 deletions
  1. 6 1
      Ix.NET/Source/Directory.build.props

+ 6 - 1
Ix.NET/Source/Directory.build.props

@@ -24,7 +24,12 @@
   <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
     <DebugType>full</DebugType>
   </PropertyGroup>
-    
+
+  <!-- While in beta, we need to set 8.0 manually (rather than latest). -->
+  <PropertyGroup Condition="'$(BuildForCSharp8)' == 'true'">
+    <LangVersion>8.0</LangVersion>
+  </PropertyGroup>
+
   <ItemGroup>
     <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-18618-05" PrivateAssets="All"/>
     <PackageReference Include="Nerdbank.GitVersioning" Version="2.3.38" PrivateAssets="all" />