Repository: reef
Updated Branches:
  refs/heads/master 21029140a -> c0477f512


[REEF-1885] Update the .NET Core projects to target .NET Core and Standard 2.0

This changes the .netcore projects (*.DotNet.csproj) to target netstandard2.0
for libraries and netcoreapp2.0 for tests. The commit includes the following:

 * Moving the target frameworks into the build.DotNetLibrary.props and
   build.DotNetApp.props. Projects no longer define their own target frameworks
   and now include the appropriate .props file.
 * Adding conditional references of C# libraries to separate what is referenced
   for .net core builds vs .net46 or .net451.
 * Updated the code that interfaces with the Windows Azure Storage library since
   the non-async calls are note available for .netcore. To keep the code
   consistent for .netcore and .net, the new code calls the appropriate async
   version of the API and blocks until the call is complete. This also updates
   the tests to do the same thing.
 * Additional changes to the xunit.DotNet.props to get tests working on all
   platforms.

With these changes, we can now build the existing DotNet projects on linux
platforms.

JIRA:
  [REEF-1885](https://issues.apache.org/jira/browse/REEF-1885)

Pull request:
  This closes #1379


Project: http://git-wip-us.apache.org/repos/asf/reef/repo
Commit: http://git-wip-us.apache.org/repos/asf/reef/commit/c0477f51
Tree: http://git-wip-us.apache.org/repos/asf/reef/tree/c0477f51
Diff: http://git-wip-us.apache.org/repos/asf/reef/diff/c0477f51

Branch: refs/heads/master
Commit: c0477f512f654d366fb9026c7abd6fee101a0e9b
Parents: 2102914
Author: Scott Inglis <[email protected]>
Authored: Wed Sep 13 13:24:09 2017 -0700
Committer: Markus Weimer <[email protected]>
Committed: Mon Sep 18 17:54:04 2017 -0700

----------------------------------------------------------------------
 .../Org.Apache.REEF.Common.DotNet.csproj        |  5 +-
 lang/cs/Org.Apache.REEF.DotNet.sln              |  4 +-
 .../Org.Apache.REEF.Driver.DotNet.csproj        |  5 +-
 ...rg.Apache.REEF.Evaluator.Tests.DotNet.csproj |  3 +-
 .../Org.Apache.REEF.Evaluator.DotNet.csproj     |  5 +-
 .../Org.Apache.REEF.Examples.DotNet.csproj      |  5 +-
 .../Org.Apache.REEF.IO.Tests.DotNet.csproj      |  5 +-
 .../TestAzureBlockBlobFileSystem.cs             |  3 +-
 .../TestAzureBlockBlobFileSystemE2E.cs          | 80 +++++++++++++-------
 .../AzureBlob/AzureBlockBlobFileSystem.cs       |  2 +-
 .../AzureBlob/AzureCloudBlobClient.cs           | 10 ++-
 .../AzureBlob/AzureCloudBlobContainer.cs        |  2 +-
 .../AzureBlob/AzureCloudBlobDirectory.cs        |  4 +-
 .../FileSystem/AzureBlob/AzureCloudBlockBlob.cs | 22 +++---
 .../Org.Apache.REEF.IO.DotNet.csproj            | 10 ++-
 ...g.Apache.REEF.Network.Examples.DotNet.csproj |  5 +-
 .../Org.Apache.REEF.Network.Tests.DotNet.csproj |  5 +-
 .../Org.Apache.REEF.Network.DotNet.csproj       |  7 +-
 .../Org.Apache.REEF.Tang.Examples.DotNet.csproj |  5 +-
 .../Org.Apache.REEF.Tang.Tests.DotNet.csproj    |  7 +-
 .../Org.Apache.REEF.Tang.Tools.DotNet.csproj    |  3 +-
 .../Org.Apache.REEF.Tang.DotNet.csproj          |  5 +-
 .../Org.Apache.REEF.Utilities.DotNet.csproj     |  3 +-
 .../Org.Apache.REEF.Wake.Tests.DotNet.csproj    |  3 +-
 .../Org.Apache.REEF.Wake.DotNet.csproj          | 11 +--
 lang/cs/build.DotNet.props                      |  1 +
 lang/cs/build.DotNetApp.props                   | 24 ++++++
 lang/cs/build.DotNetLibrary.props               | 24 ++++++
 lang/cs/xunit.DotNet.props                      | 23 +++---
 29 files changed, 196 insertions(+), 95 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/Org.Apache.REEF.Common/Org.Apache.REEF.Common.DotNet.csproj
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Common/Org.Apache.REEF.Common.DotNet.csproj 
b/lang/cs/Org.Apache.REEF.Common/Org.Apache.REEF.Common.DotNet.csproj
index 396a6d3..d74f611 100644
--- a/lang/cs/Org.Apache.REEF.Common/Org.Apache.REEF.Common.DotNet.csproj
+++ b/lang/cs/Org.Apache.REEF.Common/Org.Apache.REEF.Common.DotNet.csproj
@@ -21,15 +21,16 @@ under the License.
     <AssemblyName>Org.Apache.REEF.Common</AssemblyName>
     <Description>REEF Common Infrastructure</Description>
     <PackageTags>REEF Common Infrastructure</PackageTags>
-    
<TargetFrameworks>netstandard2.0;netcoreapp2.0;net46;net451</TargetFrameworks>
   </PropertyGroup>
-  <Import Project="..\build.DotNet.props" />
+  <Import Project="..\build.DotNetLibrary.props" />
   <ItemGroup>
     <PackageReference Include="Newtonsoft.Json" 
Version="$(NewtonsoftJsonVersion)" />
     <PackageReference Include="protobuf-net" Version="$(ProtobufVersion)" />
     <PackageReference Include="Microsoft.Avro.Core" Version="$(AvroVersion)" />
     <PackageReference Include="System.Reactive.Core" 
Version="$(SystemReactiveVersion)" />
     <PackageReference Include="System.Reactive.Interfaces" 
Version="$(SystemReactiveVersion)" />
+  </ItemGroup>
+  <ItemGroup Condition="'$(TargetFramework)' == 'net451' Or 
'$(TargetFramework)' == 'net46'">
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Runtime.Serialization" />

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/Org.Apache.REEF.DotNet.sln
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.DotNet.sln 
b/lang/cs/Org.Apache.REEF.DotNet.sln
index a7cb0fb..0ca35da 100644
--- a/lang/cs/Org.Apache.REEF.DotNet.sln
+++ b/lang/cs/Org.Apache.REEF.DotNet.sln
@@ -1,9 +1,9 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 15
-VisualStudioVersion = 15.0.26403.7
+VisualStudioVersion = 15.0.26730.12
 MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = 
"Org.Apache.Reef.Utilities.DotNet", 
"Org.Apache.REEF.Utilities\Org.Apache.Reef.Utilities.DotNet.csproj", 
"{FE4CEA75-2F26-4C97-B256-375AA698B4A9}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = 
"Org.Apache.REEF.Utilities.DotNet", 
"Org.Apache.REEF.Utilities\Org.Apache.REEF.Utilities.DotNet.csproj", 
"{FE4CEA75-2F26-4C97-B256-375AA698B4A9}"
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = 
"Org.Apache.REEF.Tang.DotNet", 
"Org.Apache.REEF.Tang\Org.Apache.REEF.Tang.DotNet.csproj", 
"{16E1218C-9A3C-49E2-A939-C29944BBB72E}"
 EndProject

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/Org.Apache.REEF.Driver/Org.Apache.REEF.Driver.DotNet.csproj
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Driver/Org.Apache.REEF.Driver.DotNet.csproj 
b/lang/cs/Org.Apache.REEF.Driver/Org.Apache.REEF.Driver.DotNet.csproj
index 2cd7d84..20145c0 100644
--- a/lang/cs/Org.Apache.REEF.Driver/Org.Apache.REEF.Driver.DotNet.csproj
+++ b/lang/cs/Org.Apache.REEF.Driver/Org.Apache.REEF.Driver.DotNet.csproj
@@ -21,12 +21,13 @@ under the License.
     <AssemblyName>Org.Apache.REEF.Driver</AssemblyName>
     <Description>Driver for REEF.NET</Description>
     <PackageTags>REEF Driver</PackageTags>
-    
<TargetFrameworks>netstandard2.0;netcoreapp2.0;net46;net451</TargetFrameworks>
   </PropertyGroup>
-  <Import Project="..\build.DotNet.props" />
+  <Import Project="..\build.DotNetLibrary.props" />
   <ItemGroup>
     <PackageReference Include="protobuf-net" Version="$(ProtobufVersion)" />
     <PackageReference Include="Microsoft.Avro.Core" Version="$(AvroVersion)" />
+  </ItemGroup>
+  <ItemGroup Condition="'$(TargetFramework)' == 'net451' Or 
'$(TargetGramework)' == 'net46'">
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Runtime.Serialization" />

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/Org.Apache.REEF.Evaluator.Tests/Org.Apache.REEF.Evaluator.Tests.DotNet.csproj
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Evaluator.Tests/Org.Apache.REEF.Evaluator.Tests.DotNet.csproj
 
b/lang/cs/Org.Apache.REEF.Evaluator.Tests/Org.Apache.REEF.Evaluator.Tests.DotNet.csproj
index b93b0f8..5f0a653 100644
--- 
a/lang/cs/Org.Apache.REEF.Evaluator.Tests/Org.Apache.REEF.Evaluator.Tests.DotNet.csproj
+++ 
b/lang/cs/Org.Apache.REEF.Evaluator.Tests/Org.Apache.REEF.Evaluator.Tests.DotNet.csproj
@@ -17,9 +17,8 @@ under the License.
 -->
   <PropertyGroup>
     <AssemblyName>Org.Apache.REEF.Evaluator.Tests</AssemblyName>
-    <TargetFrameworks>net46;net451</TargetFrameworks>
   </PropertyGroup>
-  <Import Project="..\build.DotNet.props" />
+  <Import Project="..\build.DotNetApp.props" />
   <ItemGroup>
     <PackageReference Include="NSubstitute" Version="$(NSubstituteVersion)" />
     <PackageReference Include="protobuf-net" Version="$(ProtobufVersion)" />

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/Org.Apache.REEF.Evaluator/Org.Apache.REEF.Evaluator.DotNet.csproj
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Evaluator/Org.Apache.REEF.Evaluator.DotNet.csproj 
b/lang/cs/Org.Apache.REEF.Evaluator/Org.Apache.REEF.Evaluator.DotNet.csproj
index 28e1c2f..c7bc5f9 100644
--- a/lang/cs/Org.Apache.REEF.Evaluator/Org.Apache.REEF.Evaluator.DotNet.csproj
+++ b/lang/cs/Org.Apache.REEF.Evaluator/Org.Apache.REEF.Evaluator.DotNet.csproj
@@ -21,11 +21,12 @@ under the License.
     <AssemblyName>Org.Apache.REEF.Evaluator</AssemblyName>
     <Description>Evaluator for REEF.NET</Description>
     <PackageTags>REEF Evaluator</PackageTags>
-    
<TargetFrameworks>netstandard2.0;netcoreapp2.0;net46;net451</TargetFrameworks>
   </PropertyGroup>
-  <Import Project="..\build.DotNet.props" />
+  <Import Project="..\build.DotNetLibrary.props" />
   <ItemGroup>
     <PackageReference Include="protobuf-net" Version="$(ProtobufVersion)" />
+  </ItemGroup>
+  <ItemGroup Condition="'$(TargetFramework)' == 'net451' Or 
'$(TargetFramework)' == 'net46'">
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Configuration" />

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/Org.Apache.REEF.Examples/Org.Apache.REEF.Examples.DotNet.csproj
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Examples/Org.Apache.REEF.Examples.DotNet.csproj 
b/lang/cs/Org.Apache.REEF.Examples/Org.Apache.REEF.Examples.DotNet.csproj
index 663795d..99d3709 100644
--- a/lang/cs/Org.Apache.REEF.Examples/Org.Apache.REEF.Examples.DotNet.csproj
+++ b/lang/cs/Org.Apache.REEF.Examples/Org.Apache.REEF.Examples.DotNet.csproj
@@ -21,12 +21,13 @@ under the License.
     <AssemblyName>Org.Apache.REEF.Examples</AssemblyName>
     <Description>REEF Examples</Description>
     <PackageTags>REEF Examples</PackageTags>
-    <TargetFrameworks>net46;net451</TargetFrameworks>
   </PropertyGroup>
-  <Import Project="..\build.DotNet.props" />
+  <Import Project="..\build.DotNetLibrary.props" />
   <ItemGroup>
     <PackageReference Include="Newtonsoft.Json" 
Version="$(NewtonsoftJsonVersion)" />
     <PackageReference Include="Microsoft.Avro.Core" Version="$(AvroVersion)" />
+  </ItemGroup>
+  <ItemGroup Condition="'$(TargetFramework)' == 'net451' Or 
'$(TargetFramework)' == 'net46'">
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Runtime.Serialization" />

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/Org.Apache.REEF.IO.Tests/Org.Apache.REEF.IO.Tests.DotNet.csproj
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.IO.Tests/Org.Apache.REEF.IO.Tests.DotNet.csproj 
b/lang/cs/Org.Apache.REEF.IO.Tests/Org.Apache.REEF.IO.Tests.DotNet.csproj
index 2b7fd61..1ab52b7 100644
--- a/lang/cs/Org.Apache.REEF.IO.Tests/Org.Apache.REEF.IO.Tests.DotNet.csproj
+++ b/lang/cs/Org.Apache.REEF.IO.Tests/Org.Apache.REEF.IO.Tests.DotNet.csproj
@@ -17,12 +17,13 @@ under the License.
 -->
   <PropertyGroup>
     <AssemblyName>Org.Apache.REEF.IO.Tests</AssemblyName>
-    <TargetFrameworks>net46;net451</TargetFrameworks>
   </PropertyGroup>
-  <Import Project="..\build.DotNet.props" />
+  <Import Project="..\build.DotNetApp.props" />
   <ItemGroup>
     <PackageReference Include="NSubstitute" Version="$(NSubstituteVersion)" />
     <PackageReference Include="WindowsAzure.Storage" 
Version="$(WindowsAzureStorageVersion)" />
+  </ItemGroup>
+  <ItemGroup Condition="'$(TargetFramework)' == 'net451' Or 
'$(TargetFramework)' == 'net46'">
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Xml.Linq" />

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/Org.Apache.REEF.IO.Tests/TestAzureBlockBlobFileSystem.cs
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO.Tests/TestAzureBlockBlobFileSystem.cs 
b/lang/cs/Org.Apache.REEF.IO.Tests/TestAzureBlockBlobFileSystem.cs
index 1c622d2..a1f9b34 100644
--- a/lang/cs/Org.Apache.REEF.IO.Tests/TestAzureBlockBlobFileSystem.cs
+++ b/lang/cs/Org.Apache.REEF.IO.Tests/TestAzureBlockBlobFileSystem.cs
@@ -18,6 +18,7 @@
 using System;
 using System.IO;
 using System.Linq;
+using System.Threading.Tasks;
 using Microsoft.WindowsAzure.Storage;
 using Microsoft.WindowsAzure.Storage.Blob;
 using NSubstitute;
@@ -114,7 +115,7 @@ namespace Org.Apache.REEF.IO.Tests
             
testContext.TestCloudBlobContainer.Received(1).GetDirectoryReference("directory");
             
testContext.TestCloudBlobDirectory.Received(1).GetDirectoryReference("directory");
             testContext.TestCloudBlobDirectory.Received(1).ListBlobs(true);
-            testContext.TestCloudBlob.Received(5).DeleteIfExists();
+            testContext.TestCloudBlob.Received(5).DeleteIfExistsAsync();
         }
 
         [Fact]

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/Org.Apache.REEF.IO.Tests/TestAzureBlockBlobFileSystemE2E.cs
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.IO.Tests/TestAzureBlockBlobFileSystemE2E.cs 
b/lang/cs/Org.Apache.REEF.IO.Tests/TestAzureBlockBlobFileSystemE2E.cs
index f2f4a11..8e8a708 100644
--- a/lang/cs/Org.Apache.REEF.IO.Tests/TestAzureBlockBlobFileSystemE2E.cs
+++ b/lang/cs/Org.Apache.REEF.IO.Tests/TestAzureBlockBlobFileSystemE2E.cs
@@ -49,25 +49,53 @@ namespace Org.Apache.REEF.IO.Tests
 
             _fileSystem = 
TangFactory.GetTang().NewInjector(conf).GetInstance<AzureBlockBlobFileSystem>();
             _container = 
CloudStorageAccount.Parse(connectionString).CreateCloudBlobClient().GetContainerReference(defaultContainerName);
-            _container.CreateIfNotExists();
+            _container.CreateIfNotExistsAsync().Wait();
         }
 
         public void Dispose()
         {
             if (_container != null)
             {
-                _container.DeleteIfExists();
+                _container.DeleteIfExistsAsync().Wait();
             }
         }
 
+        private bool CheckBlobExists(ICloudBlob blob)
+        {
+            var task = blob.ExistsAsync();
+            task.Wait();
+            return task.Result;
+        }
+
+        private bool CheckContainerExists(CloudBlobContainer container)
+        {
+            var task = container.ExistsAsync();
+            task.Wait();
+            return task.Result;
+        }
+
+        private ICloudBlob GetBlobReferenceFromServer(CloudBlobContainer 
container, string blobName)
+        {
+            var task = container.GetBlobReferenceFromServerAsync(blobName);
+            task.Wait();
+            return task.Result;
+        }
+
+        private string DownloadText(CloudBlockBlob blob)
+        {
+            var task = blob.DownloadTextAsync();
+            task.Wait();
+            return task.Result;
+        }
+
         [Fact(Skip = "Fill in credentials before running test")]
         public void TestDeleteE2E()
         {
             var blob = _container.GetBlockBlobReference(HelloFile);
             UploadFromString(blob, "hello");
-            Assert.True(blob.Exists());
+            Assert.True(CheckBlobExists(blob));
             _fileSystem.Delete(PathToFile(HelloFile));
-            Assert.False(blob.Exists());
+            Assert.False(CheckBlobExists(blob));
         }
 
         [Fact(Skip = "Fill in credentials before running test")]
@@ -77,7 +105,7 @@ namespace Org.Apache.REEF.IO.Tests
             var blob = _container.GetBlockBlobReference(HelloFile);
             UploadFromString(blob, "hello");
             Assert.True(_fileSystem.Exists(helloFilePath));
-            blob.DeleteIfExists();
+            blob.DeleteIfExistsAsync().Wait();
             Assert.False(_fileSystem.Exists(helloFilePath));
         }
 
@@ -90,15 +118,15 @@ namespace Org.Apache.REEF.IO.Tests
             var destFilePath = PathToFile(destFileName);
             ICloudBlob srcBlob = _container.GetBlockBlobReference(srcFileName);
             UploadFromString(srcBlob, "hello");
-            Assert.True(srcBlob.Exists());
+            Assert.True(CheckBlobExists(srcBlob));
             ICloudBlob destBlob = 
_container.GetBlockBlobReference(destFileName);
-            Assert.False(destBlob.Exists());
+            Assert.False(CheckBlobExists(destBlob));
             _fileSystem.Copy(srcFilePath, destFilePath);
-            destBlob = _container.GetBlobReferenceFromServer(destFileName);
-            Assert.True(destBlob.Exists());
-            srcBlob = _container.GetBlobReferenceFromServer(srcFileName);
-            Assert.True(srcBlob.Exists());
-            
Assert.Equal(_container.GetBlockBlobReference(srcFileName).DownloadText(), 
_container.GetBlockBlobReference(destFileName).DownloadText());
+            destBlob = GetBlobReferenceFromServer(_container, destFileName);
+            Assert.True(CheckBlobExists(destBlob));
+            srcBlob = GetBlobReferenceFromServer(_container, srcFileName);
+            Assert.True(CheckBlobExists(srcBlob));
+            
Assert.Equal(DownloadText(_container.GetBlockBlobReference(srcFileName)), 
DownloadText(_container.GetBlockBlobReference(destFileName)));
         }
 
         [Fact(Skip = "Fill in credentials before running test")]
@@ -126,18 +154,18 @@ namespace Org.Apache.REEF.IO.Tests
         {
             var helloFilePath = PathToFile(HelloFile);
             ICloudBlob blob = _container.GetBlockBlobReference(HelloFile);
-            Assert.False(blob.Exists());
+            Assert.False(CheckBlobExists(blob));
             var tempFilePath = GetTempFilePath();
             const string text = "hello";
             try
             {
                 File.WriteAllText(tempFilePath, text);
                 _fileSystem.CopyFromLocal(tempFilePath, helloFilePath);
-                blob = _container.GetBlobReferenceFromServer(HelloFile);
-                Assert.True(blob.Exists());
+                blob = GetBlobReferenceFromServer(_container, HelloFile);
+                Assert.True(CheckBlobExists(blob));
                 using (var stream = new MemoryStream())
                 {
-                    blob.DownloadToStream(stream);
+                    blob.DownloadToStreamAsync(stream).Wait();
                     stream.Seek(0, SeekOrigin.Begin);
 
                     using (var sr = new StreamReader(stream))
@@ -157,7 +185,7 @@ namespace Org.Apache.REEF.IO.Tests
         public void TestDeleteDirectoryAtContainerE2E()
         {
             _fileSystem.DeleteDirectory(_container.Uri);
-            Assert.False(_container.Exists());
+            Assert.False(CheckContainerExists(_container));
         }
 
         [Fact(Skip = "Fill in credentials before running test")]
@@ -171,7 +199,7 @@ namespace Org.Apache.REEF.IO.Tests
                 var filePath = directory + '/' + i;
                 var blockBlob = _container.GetBlockBlobReference(filePath);
                 UploadFromString(blockBlob, "hello");
-                Assert.True(blockBlob.Exists());
+                Assert.True(CheckBlobExists(blockBlob));
                 blockBlobs.Add(blockBlob);
             }
 
@@ -179,10 +207,10 @@ namespace Org.Apache.REEF.IO.Tests
 
             foreach (var blockBlob in blockBlobs)
             {
-                Assert.False(blockBlob.Exists());
+                Assert.False(CheckBlobExists(blockBlob));
             }
 
-            Assert.True(_container.Exists());
+            Assert.True(CheckContainerExists(_container));
         }
 
         [Fact(Skip = "Fill in credentials before running test")]
@@ -201,8 +229,8 @@ namespace Org.Apache.REEF.IO.Tests
                 var blockBlob2 = _container.GetBlockBlobReference(filePath2);
                 UploadFromString(blockBlob1, "hello");
                 UploadFromString(blockBlob2, "hello");
-                Assert.True(blockBlob1.Exists());
-                Assert.True(blockBlob2.Exists());
+                Assert.True(CheckBlobExists(blockBlob1));
+                Assert.True(CheckBlobExists(blockBlob2));
                 blockBlobs1.Add(blockBlob1);
                 blockBlobs2.Add(blockBlob2);
             }
@@ -211,15 +239,15 @@ namespace Org.Apache.REEF.IO.Tests
 
             foreach (var blockBlob in blockBlobs2)
             {
-                Assert.False(blockBlob.Exists());
+                Assert.False(CheckBlobExists(blockBlob));
             }
 
             foreach (var blockBlob in blockBlobs1)
             {
-                Assert.True(blockBlob.Exists());
+                Assert.True(CheckBlobExists(blockBlob));
             }
 
-            Assert.True(_container.Exists());
+            Assert.True(CheckContainerExists(_container));
         }
 
         private static string GetTempFilePath()
@@ -230,7 +258,7 @@ namespace Org.Apache.REEF.IO.Tests
         private static void UploadFromString(ICloudBlob blob, string str)
         {
             var byteArray = Encoding.UTF8.GetBytes(str);
-            blob.UploadFromByteArray(byteArray, 0, byteArray.Length);
+            blob.UploadFromByteArrayAsync(byteArray, 0, 
byteArray.Length).Wait();
         }
 
         private Uri PathToFile(string filePath)

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureBlockBlobFileSystem.cs
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureBlockBlobFileSystem.cs 
b/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureBlockBlobFileSystem.cs
index 05267b6..b5f659c 100644
--- 
a/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureBlockBlobFileSystem.cs
+++ 
b/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureBlockBlobFileSystem.cs
@@ -147,7 +147,7 @@ namespace Org.Apache.REEF.IO.FileSystem.AzureBlob
 
             foreach (var blob in 
directory.ListBlobs(true).OfType<ICloudBlob>())
             {
-                blob.DeleteIfExists();
+                blob.DeleteIfExistsAsync().Wait();
             }
         }
 

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureCloudBlobClient.cs
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureCloudBlobClient.cs 
b/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureCloudBlobClient.cs
index ab92bf3..86d55fa 100644
--- a/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureCloudBlobClient.cs
+++ b/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureCloudBlobClient.cs
@@ -52,7 +52,9 @@ namespace Org.Apache.REEF.IO.FileSystem.AzureBlob
 
         public ICloudBlob GetBlobReferenceFromServer(Uri blobUri)
         {
-            return _client.GetBlobReferenceFromServer(blobUri);
+            var task = _client.GetBlobReferenceFromServerAsync(blobUri);
+            task.Wait();
+            return task.Result;
         }
 
         public ICloudBlobContainer GetContainerReference(string containerName)
@@ -69,8 +71,10 @@ namespace Org.Apache.REEF.IO.FileSystem.AzureBlob
             int? maxResults, BlobContinuationToken continuationToken, 
BlobRequestOptions blobRequestOptions,
             OperationContext operationContext)
         {
-            return _client.ListBlobsSegmented(prefix, useFlatListing, 
blobListingDetails, maxResults, continuationToken,
-                blobRequestOptions, operationContext);
+            var task = _client.ListBlobsSegmentedAsync(prefix, useFlatListing, 
blobListingDetails, maxResults,  continuationToken, 
+                                                        blobRequestOptions, 
operationContext);
+            task.Wait();
+            return task.Result;
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureCloudBlobContainer.cs
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureCloudBlobContainer.cs 
b/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureCloudBlobContainer.cs
index fb9ff81..03b9123 100644
--- a/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureCloudBlobContainer.cs
+++ b/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureCloudBlobContainer.cs
@@ -33,7 +33,7 @@ namespace Org.Apache.REEF.IO.FileSystem.AzureBlob
 
         public void DeleteIfExists()
         {
-            _container.DeleteIfExists();
+            _container.DeleteIfExistsAsync().Wait();
         }
 
         public ICloudBlobDirectory GetDirectoryReference(string directoryName)

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureCloudBlobDirectory.cs
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureCloudBlobDirectory.cs 
b/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureCloudBlobDirectory.cs
index 599c02a..bf6c4b0 100644
--- a/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureCloudBlobDirectory.cs
+++ b/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureCloudBlobDirectory.cs
@@ -39,7 +39,9 @@ namespace Org.Apache.REEF.IO.FileSystem.AzureBlob
 
         public IEnumerable<IListBlobItem> ListBlobs(bool useFlatListing = 
false)
         {
-            return _directory.ListBlobs(useFlatListing);
+            var task = _directory.ListBlobsSegmentedAsync(useFlatListing, 
BlobListingDetails.All, null, null, null, null);
+            task.Wait();
+            return task.Result.Results;
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureCloudBlockBlob.cs
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureCloudBlockBlob.cs 
b/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureCloudBlockBlob.cs
index 4420b98..c4b9c6d 100644
--- a/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureCloudBlockBlob.cs
+++ b/lang/cs/Org.Apache.REEF.IO/FileSystem/AzureBlob/AzureCloudBlockBlob.cs
@@ -61,41 +61,45 @@ namespace Org.Apache.REEF.IO.FileSystem.AzureBlob
 
         public bool Exists()
         {
-            return _blob.Exists();
+            var task = _blob.ExistsAsync();
+            task.Wait();
+            return task.Result;
         }
 
         public void Delete()
         {
-            _blob.Delete();
+            _blob.DeleteAsync().Wait();
         }
 
         public void DeleteIfExists()
         {
-            _blob.DeleteIfExists();
+            _blob.DeleteIfExistsAsync().Wait();
         }
 
         public string StartCopy(Uri source)
         {
-            return _blob.StartCopy(source);
+            var task = _blob.StartCopyAsync(source);
+            task.Wait();
+            return task.Result;
         }
 
         public void DownloadToFile(string path, FileMode mode)
         {
-            _blob.DownloadToFile(path, mode);
+            _blob.DownloadToFileAsync(path, mode).Wait();
         }
 
         public void UploadFromFile(string path, FileMode mode)
         {
             #if DOTNET_BUILD
-                _blob.UploadFromFile(path);
+                _blob.UploadFromFileAsync(path).Wait();
             #else
-                _blob.UploadFromFile(path, mode);
+                _blob.UploadFromFileAsync(path, mode).Wait();
             #endif
         }
 
         public void FetchAttributes()
         {
-            _blob.FetchAttributes();
+            _blob.FetchAttributesAsync().Wait();
         }
     }
-}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/Org.Apache.REEF.IO/Org.Apache.REEF.IO.DotNet.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.IO/Org.Apache.REEF.IO.DotNet.csproj 
b/lang/cs/Org.Apache.REEF.IO/Org.Apache.REEF.IO.DotNet.csproj
index fd2ba53..6e9bd6a 100644
--- a/lang/cs/Org.Apache.REEF.IO/Org.Apache.REEF.IO.DotNet.csproj
+++ b/lang/cs/Org.Apache.REEF.IO/Org.Apache.REEF.IO.DotNet.csproj
@@ -21,9 +21,8 @@ under the License.
     <AssemblyName>Org.Apache.REEF.IO</AssemblyName>
     <Description>I/O library for Apache REEF</Description>
     <PackageTags> Apache REEF IO</PackageTags>
-    <TargetFrameworks>net46;net451</TargetFrameworks>
   </PropertyGroup>
-  <Import Project="..\build.DotNet.props" />
+  <Import Project="..\build.DotNetLibrary.props" />
   <ItemGroup>
     <PackageReference Include="Microsoft.Azure.KeyVault.Core" Version="2.0.4" 
/>
     <PackageReference Include="Microsoft.Data.Edm" Version="5.8.2" />
@@ -32,11 +31,16 @@ under the License.
     <PackageReference Include="System.Spatial" Version="5.8.2" />
     <PackageReference Include="WindowsAzure.Storage" 
Version="$(WindowsAzureStorageVersion)" />
     <PackageReference Include="Newtonsoft.Json" 
Version="$(NewtonsoftJsonVersion)" />
+  </ItemGroup>
+  <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
+    <PackageReference Include="System.IO.FileSystem.AccessControl" 
Version="4.4.0" />
+  </ItemGroup>
+  <ItemGroup Condition="'$(TargetFramework)' == 'net451' Or 
'$(TargetFramework)' == 'net46'">
+    <Reference Include="Microsoft.CSharp" />
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Xml.Linq" />
     <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="Microsoft.CSharp" />
     <Reference Include="System.Data" />
     <Reference Include="System.Xml" />
   </ItemGroup>

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/Org.Apache.REEF.Network.Examples/Org.Apache.REEF.Network.Examples.DotNet.csproj
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Network.Examples/Org.Apache.REEF.Network.Examples.DotNet.csproj
 
b/lang/cs/Org.Apache.REEF.Network.Examples/Org.Apache.REEF.Network.Examples.DotNet.csproj
index 74a2ee4..ae177f5 100644
--- 
a/lang/cs/Org.Apache.REEF.Network.Examples/Org.Apache.REEF.Network.Examples.DotNet.csproj
+++ 
b/lang/cs/Org.Apache.REEF.Network.Examples/Org.Apache.REEF.Network.Examples.DotNet.csproj
@@ -21,10 +21,9 @@ under the License.
     <AssemblyName>Org.Apache.REEF.Network.Examples</AssemblyName>
     <Description>Examples for network services for REEF</Description>
     <PackageTags>REEF Network services examples</PackageTags>
-    <TargetFrameworks>net46;net451</TargetFrameworks>
   </PropertyGroup>
-  <Import Project="..\build.DotNet.props" />
-  <ItemGroup>
+  <Import Project="..\build.DotNetLibrary.props" />
+  <ItemGroup Condition="'$(TargetFramework)' == 'net451' Or 
'$(TargetFramework)' == 'net46'">
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Xml.Linq" />

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/Org.Apache.REEF.Network.Tests/Org.Apache.REEF.Network.Tests.DotNet.csproj
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Network.Tests/Org.Apache.REEF.Network.Tests.DotNet.csproj
 
b/lang/cs/Org.Apache.REEF.Network.Tests/Org.Apache.REEF.Network.Tests.DotNet.csproj
index 784c6ed..782ab9a 100644
--- 
a/lang/cs/Org.Apache.REEF.Network.Tests/Org.Apache.REEF.Network.Tests.DotNet.csproj
+++ 
b/lang/cs/Org.Apache.REEF.Network.Tests/Org.Apache.REEF.Network.Tests.DotNet.csproj
@@ -17,12 +17,13 @@ under the License.
 -->
   <PropertyGroup>
     <AssemblyName>Org.Apache.REEF.Network.Tests</AssemblyName>
-    <TargetFrameworks>net46;net451</TargetFrameworks>
   </PropertyGroup>
-  <Import Project="..\build.DotNet.props" />
+  <Import Project="..\build.DotNetApp.props" />
   <ItemGroup>
     <PackageReference Include="System.Reactive.Core" 
Version="$(SystemReactiveVersion)" />
     <PackageReference Include="System.Reactive.Interfaces" 
Version="$(SystemReactiveVersion)" />
+  </ItemGroup>
+  <ItemGroup Condition="'$(TargetFramework)' == 'net451' Or 
'$(TargetFramework)' == 'net46'">
     <Reference Include="System" />
   </ItemGroup>
   <Import Project="..\xunit.DotNet.props" />

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/Org.Apache.REEF.Network/Org.Apache.REEF.Network.DotNet.csproj
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Network/Org.Apache.REEF.Network.DotNet.csproj 
b/lang/cs/Org.Apache.REEF.Network/Org.Apache.REEF.Network.DotNet.csproj
index 021c7be..30d1f8f 100644
--- a/lang/cs/Org.Apache.REEF.Network/Org.Apache.REEF.Network.DotNet.csproj
+++ b/lang/cs/Org.Apache.REEF.Network/Org.Apache.REEF.Network.DotNet.csproj
@@ -21,17 +21,18 @@ under the License.
     <AssemblyName>Org.Apache.REEF.Network</AssemblyName>
     <Description>Network services for REEF</Description>
     <PackageTags>REEF Network services</PackageTags>
-    <TargetFrameworks>net46;net451</TargetFrameworks>
   </PropertyGroup>
-  <Import Project="..\build.DotNet.props" />
+  <Import Project="..\build.DotNetLibrary.props" />
   <ItemGroup>
     <PackageReference Include="protobuf-net" Version="$(ProtobufVersion)" />
     <PackageReference Include="Microsoft.Avro.Core" Version="$(AvroVersion)" />
     <PackageReference Include="System.Reactive.Core" 
Version="$(SystemReactiveVersion)" />
     <PackageReference Include="System.Reactive.Interfaces" 
Version="$(SystemReactiveVersion)" />
+    <PackageReference Include="Microsoft.Extensions.Caching.Memory" 
Version="1.1.2" />
+  </ItemGroup>
+  <ItemGroup Condition="'$(TargetFramework)' == 'net451' Or 
'$(TargetFramework)' == 'net46'">
     <Reference Include="System" />
     <Reference Include="System.Core" />
-    <Reference Include="System.Runtime.Caching" />
     <Reference Include="System.Runtime.Serialization" />
     <Reference Include="System.Xml" />
   </ItemGroup>

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/Org.Apache.REEF.Tang.Examples/Org.Apache.REEF.Tang.Examples.DotNet.csproj
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Tang.Examples/Org.Apache.REEF.Tang.Examples.DotNet.csproj
 
b/lang/cs/Org.Apache.REEF.Tang.Examples/Org.Apache.REEF.Tang.Examples.DotNet.csproj
index 93ab354..3af5f8c 100644
--- 
a/lang/cs/Org.Apache.REEF.Tang.Examples/Org.Apache.REEF.Tang.Examples.DotNet.csproj
+++ 
b/lang/cs/Org.Apache.REEF.Tang.Examples/Org.Apache.REEF.Tang.Examples.DotNet.csproj
@@ -21,10 +21,9 @@ under the License.
     <AssemblyName>Org.Apache.REEF.Tang.Examples</AssemblyName>
     <Description>Examples using the Tang framework</Description>
     <PackageTags> Apache REEF tang dependency injection examples</PackageTags>
-    <TargetFrameworks>net46;net451</TargetFrameworks>
   </PropertyGroup>
-  <Import Project="..\build.DotNet.props" />
-  <ItemGroup>
+  <Import Project="..\build.DotNetLibrary.props" />
+  <ItemGroup Condition="'$(TargetFramework)' == 'net451' Or 
'$(TargetFramework)' == 'net46'">
     <Reference Include="System" />
     <Reference Include="System.Core" />
   </ItemGroup>

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/Org.Apache.REEF.Tang.Tests/Org.Apache.REEF.Tang.Tests.DotNet.csproj
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Tang.Tests/Org.Apache.REEF.Tang.Tests.DotNet.csproj 
b/lang/cs/Org.Apache.REEF.Tang.Tests/Org.Apache.REEF.Tang.Tests.DotNet.csproj
index 2b09cf2..c21b56f 100644
--- 
a/lang/cs/Org.Apache.REEF.Tang.Tests/Org.Apache.REEF.Tang.Tests.DotNet.csproj
+++ 
b/lang/cs/Org.Apache.REEF.Tang.Tests/Org.Apache.REEF.Tang.Tests.DotNet.csproj
@@ -17,17 +17,18 @@ under the License.
 -->
   <PropertyGroup>
     <AssemblyName>Org.Apache.REEF.Tang.Tests</AssemblyName>
-    <TargetFrameworks>net46;net451</TargetFrameworks>
   </PropertyGroup>
-  <Import Project="..\build.DotNet.props" />
+  <Import Project="..\build.DotNetApp.props" />
   <ItemGroup>
     <PackageReference Include="Newtonsoft.Json" 
Version="$(NewtonsoftJsonVersion)" />
     <PackageReference Include="protobuf-net" Version="$(ProtobufVersion)" />
     <PackageReference Include="Microsoft.Avro.Core" Version="$(AvroVersion)" />
+  </ItemGroup>
+  <Import Project="..\xunit.DotNet.props" />
+  <ItemGroup Condition="'$(TargetFramework)' == 'net451' Or 
'$(TargetFramework)' == 'net46'">
     <Reference Include="System" />
     <Reference Include="System.Core" />
   </ItemGroup>
-  <Import Project="..\xunit.DotNet.props" />
   <ItemGroup>
       <None Include="simpleConstructorJavaProto.bin">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/Org.Apache.REEF.Tang.Tools/Org.Apache.REEF.Tang.Tools.DotNet.csproj
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Tang.Tools/Org.Apache.REEF.Tang.Tools.DotNet.csproj 
b/lang/cs/Org.Apache.REEF.Tang.Tools/Org.Apache.REEF.Tang.Tools.DotNet.csproj
index 962f9cc..4b95544 100644
--- 
a/lang/cs/Org.Apache.REEF.Tang.Tools/Org.Apache.REEF.Tang.Tools.DotNet.csproj
+++ 
b/lang/cs/Org.Apache.REEF.Tang.Tools/Org.Apache.REEF.Tang.Tools.DotNet.csproj
@@ -20,9 +20,8 @@ under the License.
     <Description>Tools for Tang</Description>
     <PackageTags>Apache REEF Tang dependency injection</PackageTags>
     <OutputType>Exe</OutputType>
-    <TargetFrameworks>net46;net451</TargetFrameworks>
   </PropertyGroup>
-  <Import Project="..\build.DotNet.props" />
+  <Import Project="..\build.DotNetApp.props" />
   <ItemGroup>
     <ProjectReference 
Include="..\Org.Apache.REEF.Tang\Org.Apache.REEF.Tang.DotNet.csproj" />
     <ProjectReference 
Include="..\Org.Apache.REEF.Common\Org.Apache.REEF.Common.DotNet.csproj" />

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/Org.Apache.REEF.Tang/Org.Apache.REEF.Tang.DotNet.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Tang/Org.Apache.REEF.Tang.DotNet.csproj 
b/lang/cs/Org.Apache.REEF.Tang/Org.Apache.REEF.Tang.DotNet.csproj
index d745fba..6369476 100644
--- a/lang/cs/Org.Apache.REEF.Tang/Org.Apache.REEF.Tang.DotNet.csproj
+++ b/lang/cs/Org.Apache.REEF.Tang/Org.Apache.REEF.Tang.DotNet.csproj
@@ -21,13 +21,14 @@ under the License.
     <AssemblyName>Org.Apache.REEF.Tang</AssemblyName>
     <Description>Tang is a dependency injection framework</Description>
     <PackageTags> Apache REEF tang dependency injection</PackageTags>
-    
<TargetFrameworks>netstandard2.0;netcoreapp2.0;net46;net451</TargetFrameworks>
   </PropertyGroup>
-  <Import Project="..\build.DotNet.props" />
+  <Import Project="..\build.DotNetLibrary.props" />
   <ItemGroup>
     <PackageReference Include="Newtonsoft.Json" 
Version="$(NewtonsoftJsonVersion)" />
     <PackageReference Include="protobuf-net" Version="$(ProtobufVersion)" />
     <PackageReference Include="Microsoft.Avro.Core" Version="$(AvroVersion)" />
+  </ItemGroup>
+  <ItemGroup Condition="'$(TargetFramework)' == 'net451' Or 
'$(TargetFramework)' == 'net46'">
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Runtime.Serialization" />

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.REEF.Utilities.DotNet.csproj
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.REEF.Utilities.DotNet.csproj 
b/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.REEF.Utilities.DotNet.csproj
index 2a65732..ae531e4 100644
--- a/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.REEF.Utilities.DotNet.csproj
+++ b/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.REEF.Utilities.DotNet.csproj
@@ -19,9 +19,8 @@ under the License.
     <AssemblyName>Org.Apache.REEF.Utilities</AssemblyName>
     <Description>Common utilities such as logging shared across 
REEF/Wake/Tang</Description>
     <PackageTags>Apache REEF REEF/Wake/Tang common utilities</PackageTags>
-    
<TargetFrameworks>netstandard2.0;netcoreapp2.0;net46;net451</TargetFrameworks>
   </PropertyGroup>
-  <Import Project="..\build.DotNet.props" />
+  <Import Project="..\build.DotNetLibrary.props" />
   <ItemGroup>
       <PackageReference Include="Newtonsoft.Json" 
Version="$(NewtonsoftJsonVersion)" />
   </ItemGroup>

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/Org.Apache.REEF.Wake.Tests/Org.Apache.REEF.Wake.Tests.DotNet.csproj
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Wake.Tests/Org.Apache.REEF.Wake.Tests.DotNet.csproj 
b/lang/cs/Org.Apache.REEF.Wake.Tests/Org.Apache.REEF.Wake.Tests.DotNet.csproj
index f75962e..dc73da0 100644
--- 
a/lang/cs/Org.Apache.REEF.Wake.Tests/Org.Apache.REEF.Wake.Tests.DotNet.csproj
+++ 
b/lang/cs/Org.Apache.REEF.Wake.Tests/Org.Apache.REEF.Wake.Tests.DotNet.csproj
@@ -17,9 +17,8 @@ under the License.
 -->
   <PropertyGroup>
     <AssemblyName>Org.Apache.REEF.Wake.Tests</AssemblyName>
-    
<TargetFrameworks>netstandard2.0;netcoreapp2.0;net46;net451</TargetFrameworks>
   </PropertyGroup>
-  <Import Project="..\build.DotNet.props" />
+  <Import Project="..\build.DotNetApp.props" />
   <ItemGroup>
     <PackageReference Include="System.Reactive.Core" 
Version="$(SystemReactiveVersion)" />
     <PackageReference Include="System.Reactive.Interfaces" 
Version="$(SystemReactiveVersion)" />

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/Org.Apache.REEF.Wake/Org.Apache.REEF.Wake.DotNet.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Wake/Org.Apache.REEF.Wake.DotNet.csproj 
b/lang/cs/Org.Apache.REEF.Wake/Org.Apache.REEF.Wake.DotNet.csproj
index b2f59d5..076a90b 100644
--- a/lang/cs/Org.Apache.REEF.Wake/Org.Apache.REEF.Wake.DotNet.csproj
+++ b/lang/cs/Org.Apache.REEF.Wake/Org.Apache.REEF.Wake.DotNet.csproj
@@ -19,16 +19,17 @@ under the License.
     <AssemblyName>Org.Apache.REEF.Wake</AssemblyName>
     <Description>Wake is an event-driven framework</Description>
     <PackageTags>wake event-driven</PackageTags>
-    
<TargetFrameworks>netstandard2.0;netcoreapp2.0;net46;net451</TargetFrameworks>
   </PropertyGroup>
-  <Import Project="..\build.DotNet.props" />
+  <Import Project="..\build.DotNetLibrary.props" />
   <ItemGroup>
+    <PackageReference Include="protobuf-net" Version="$(ProtobufVersion)" />
+    <PackageReference Include="EnterpriseLibrary.TransientFaultHandling.Core" 
Version="$(TransientFaultHandlingVersion)" NoWarn="NU1603" />
+    <PackageReference Include="System.Reactive.Interfaces" 
Version="$(SystemReactiveVersion)" />
+  </ItemGroup>
+  <ItemGroup Condition="'$(TargetFramework)' == 'net451' Or 
'$(TargetFramework)' == 'net46'">
     <Reference Include="System" />
     <Reference Include="System.Core" />
     <Reference Include="System.Xml" />
-    <PackageReference Include="protobuf-net" Version="$(ProtobufVersion)" />
-    <PackageReference Include="EnterpriseLibrary.TransientFaultHandling.Core" 
Version="$(TransientFaultHandlingVersion)" />
-    <PackageReference Include="System.Reactive.Interfaces" 
Version="$(SystemReactiveVersion)" />
   </ItemGroup>
   <ItemGroup>
     <ProjectReference 
Include="..\Org.Apache.REEF.Tang\Org.Apache.REEF.Tang.DotNet.csproj" />

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/build.DotNet.props
----------------------------------------------------------------------
diff --git a/lang/cs/build.DotNet.props b/lang/cs/build.DotNet.props
index 6b1d9e4..10e2c17 100644
--- a/lang/cs/build.DotNet.props
+++ b/lang/cs/build.DotNet.props
@@ -34,6 +34,7 @@ under the License.
   </PropertyGroup>
 
   <PropertyGroup>
+    <Platforms>x64</Platforms>
     <PlatformTarget>x64</PlatformTarget>
     <DefineConstants>DOTNET_BUILD</DefineConstants>
     <OutputPath>..\bin\$(AssemblyName)</OutputPath>

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/build.DotNetApp.props
----------------------------------------------------------------------
diff --git a/lang/cs/build.DotNetApp.props b/lang/cs/build.DotNetApp.props
new file mode 100644
index 0000000..120dfc6
--- /dev/null
+++ b/lang/cs/build.DotNetApp.props
@@ -0,0 +1,24 @@
+<Project>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<Import Project="build.DotNet.props"/>
+<PropertyGroup>
+  <TargetFrameworks>netcoreapp2.0;net46;net451</TargetFrameworks>
+  <TargetFrameworks Condition="'$(OS)' != 
'Windows_NT'">netcoreapp2.0</TargetFrameworks>
+</PropertyGroup>
+</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/build.DotNetLibrary.props
----------------------------------------------------------------------
diff --git a/lang/cs/build.DotNetLibrary.props 
b/lang/cs/build.DotNetLibrary.props
new file mode 100644
index 0000000..8df151e
--- /dev/null
+++ b/lang/cs/build.DotNetLibrary.props
@@ -0,0 +1,24 @@
+<Project>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<Import Project="build.DotNet.props"/>
+<PropertyGroup>
+  <TargetFrameworks>netstandard2.0;net46;net451</TargetFrameworks>
+  <TargetFrameworks Condition="'$(OS)' != 
'Windows_NT'">netstandard2.0</TargetFrameworks>
+</PropertyGroup>
+</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/reef/blob/c0477f51/lang/cs/xunit.DotNet.props
----------------------------------------------------------------------
diff --git a/lang/cs/xunit.DotNet.props b/lang/cs/xunit.DotNet.props
index b866911..a08dd54 100644
--- a/lang/cs/xunit.DotNet.props
+++ b/lang/cs/xunit.DotNet.props
@@ -15,15 +15,20 @@ KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.
 -->
-<ItemGroup>
-    <PackageReference Include="xunit" Version="2.2.0"/>
-    <PackageReference Include="xunit.abstractions" Version="2.0.1"/>
-    <PackageReference Include="xunit.assert" Version="2.2.0"/>
-    <PackageReference Include="xunit.core" Version="2.2.0"/>
-    <PackageReference Include="xunit.extensibility.core" Version="2.2.0"/>
-    <PackageReference Include="xunit.extensibility.execution" Version="2.2.0"/>
-    <PackageReference Include="xunit.runner.visualstudio" Version="2.2.0"/>
-</ItemGroup>
+  <PropertyGroup>
+      <!-- Required check for .net451 test projects to work appropriately -->
+      <DebugType Condition="'$(TargetFramework)' != '' AND 
!$(TargetFramework.StartsWith('netcoreapp'))">Full</DebugType>
+  </PropertyGroup>
 
+  <ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0' Or 
'$(TargetFramework)' == 'net46'">
+    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" 
NoWarn="NU1701"/>
+    <PackageReference Include="xunit" Version="2.2.0" NoWarn="NU1701"/>
+    <PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" 
NoWarn="NU1701"/>
+  </ItemGroup>
+  <ItemGroup Condition="'$(TargetFramework)' == 'net451'">
+    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" 
NoWarn="NU1701"/>
+    <PackageReference Include="xunit" Version="2.1.0" NoWarn="NU1701"/>
+    <PackageReference Include="xunit.runner.visualstudio" Version="2.1.0" 
NoWarn="NU1701"/>
+  </ItemGroup>
 </Project>
 

Reply via email to