浏览代码

Enable netcoreapp3.0 build using async iterators and new BCL types.

Bart De Smet 6 年之前
父节点
当前提交
a95267cda6

+ 8 - 3
Ix.NET/Source/Directory.build.targets

@@ -10,13 +10,18 @@
   <PropertyGroup Condition="'$(TargetFramework)' == 'net45'">
     <DefineConstants>$(DefineConstants);NO_ARRAY_EMPTY;NO_TASK_FROMEXCEPTION</DefineConstants>
   </PropertyGroup>
-
-  <PropertyGroup>
+  <PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
     <!--
-    TODO: Enable USE_ASYNC_ITERATOR. Current errors due to missing members in target frameworks:
+    NB: USE_ASYNC_ITERATOR relies on members in the framework only present in .NET Core 3.0 Preview 2 at the moment:
           error CS0518: Predefined type 'System.Runtime.CompilerServices.AsyncIteratorMethodBuilder' is not defined or imported
           error CS0656: Missing compiler required member 'System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore`1.*
+
+    NB: AWAIT_USING_REQUIRES_IASYNCDISPOSABLE - See comments in AsyncEnumerableExtensions.cs.
     -->
+    <DefineConstants>$(DefineConstants);USE_ASYNC_ITERATOR;HAS_ASYNCENUMERABLE;HAS_ASYNCDISPOSABLE;BCL_HAS_CONFIGUREAWAIT;AWAIT_USING_REQUIRES_IASYNCDISPOSABLE</DefineConstants>
+  </PropertyGroup>
+
+  <PropertyGroup>
     <DefineConstants>$(DefineConstants);USE_AWAIT_FOREACH;USE_AWAIT_USING</DefineConstants>
   </PropertyGroup>
 

+ 1 - 1
Ix.NET/Source/System.Interactive.Async.Providers/System.Interactive.Async.Providers.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <Description>Interactive Extensions Async Providers Library used to build query providers and express queries over async enumerable sequences.</Description>
     <AssemblyTitle>Interactive Extensions - Async Providers Library</AssemblyTitle>
-    <TargetFrameworks>net45;net46;netstandard1.4;netstandard2.0</TargetFrameworks>
+    <TargetFrameworks>net45;net46;netstandard1.4;netstandard2.0;netcoreapp3.0</TargetFrameworks>
     <PackageTags>Ix;Interactive;Extensions;Enumerable;Asynchronous</PackageTags>
   </PropertyGroup>
 

+ 1 - 1
Ix.NET/Source/System.Interactive.Async/System.Interactive.Async.csproj

@@ -3,7 +3,7 @@
   <PropertyGroup>
     <Description>Interactive Extensions Async Library used to express queries over asynchronous enumerable sequences.</Description>
     <AssemblyTitle>Interactive Extensions - Async Library</AssemblyTitle>
-    <TargetFrameworks>net45;net46;netstandard1.4;netstandard2.0</TargetFrameworks>
+    <TargetFrameworks>net45;net46;netstandard1.4;netstandard2.0;netcoreapp3.0</TargetFrameworks>
     <PackageTags>Ix;Interactive;Extensions;Enumerable;Asynchronous</PackageTags>
   </PropertyGroup>
 

+ 1 - 1
Ix.NET/Source/System.Linq.Async.Queryable/System.Linq.Async.Queryable.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>net45;net46;netstandard1.4;netstandard2.0</TargetFrameworks>
+    <TargetFrameworks>net45;net46;netstandard1.4;netstandard2.0;netcoreapp3.0</TargetFrameworks>
   </PropertyGroup>
 
   <ItemGroup>

+ 1 - 1
Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
-    <TargetFrameworks>net45;net46;netstandard1.4;netstandard2.0</TargetFrameworks>
+    <TargetFrameworks>net45;net46;netstandard1.4;netstandard2.0;netcoreapp3.0</TargetFrameworks>
   </PropertyGroup>
 
   <ItemGroup>