소스 검색

add support for C# 8 build

Oren Novotny 6 년 전
부모
커밋
71c561f165
2개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      Ix.NET/Source/Directory.build.props
  2. 4 0
      Ix.NET/Source/Directory.build.targets

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

@@ -17,6 +17,7 @@
     <EmbedUntrackedSources>true</EmbedUntrackedSources>
     <EmbedUntrackedSources>true</EmbedUntrackedSources>
     <PublishRepositoryUrl>true</PublishRepositoryUrl>
     <PublishRepositoryUrl>true</PublishRepositoryUrl>
     <LangVersion>latest</LangVersion>
     <LangVersion>latest</LangVersion>
+    <BuildForCSharp8 Condition="'$(BuildForCSharp8)' == ''">true</BuildForCSharp8>
   </PropertyGroup>
   </PropertyGroup>
 
 
   <!-- Hack needed to make code coverage work. See https://github.com/Microsoft/vstest/issues/1748. -->
   <!-- Hack needed to make code coverage work. See https://github.com/Microsoft/vstest/issues/1748. -->

+ 4 - 0
Ix.NET/Source/Directory.build.targets

@@ -11,6 +11,10 @@
     <DefineConstants>$(DefineConstants);NO_ARRAY_EMPTY;NO_TASK_FROMEXCEPTION</DefineConstants>
     <DefineConstants>$(DefineConstants);NO_ARRAY_EMPTY;NO_TASK_FROMEXCEPTION</DefineConstants>
   </PropertyGroup>
   </PropertyGroup>
 
 
+  <PropertyGroup Condition="'$(BuildForCSharp8)' == 'true'">
+    <DefineConstants>$(DefineConstants);CSHARP8</DefineConstants>
+  </PropertyGroup>
+  
   <PropertyGroup>
   <PropertyGroup>
     <Product>$(AssemblyName) ($(TargetFramework))</Product>
     <Product>$(AssemblyName) ($(TargetFramework))</Product>
   </PropertyGroup>
   </PropertyGroup>