[REEF-1987] Fix build dependency with bridge and client when building in VS2017

 - This was due to the Bridge not having a dependency on the Driver
   project and the EnableDotNetBuild variable conditional being
   mispelled
 - EnableDotNetBuild variable now only sets the target framework.
   Projects will reference other projects based upon the target
   framework.
 - Bridge now has a dependency on the Driver. [REEF-1994] Packages can
   publish via msbuild using the pack target
 - Packaging is done using the following command: msbuild
    Org.Apache.REEF.DotNet.sln /t:pack
 - Added an empty pack target to the bridge to skip being packed
 - Added a Test attribute to all Test projects to prevent the tests from
   being packed.
 - Nuget packages now show up in bin\.netcore\<Assembly> [REEF-1995]
   Re-add FatNuGet package back to the solution
 - Added both the FatNuGet project and Bridge.CLR projects to the
   solution
 - FatNuGet does not include the evaluator when building .net core.

JIRA:
  [REEF-1987](https://issues.apache.org/jira/browse/REEF-1987)
  [REEF-1993](https://issues.apache.org/jira/browse/REEF-1993)
  [REEF-1994](https://issues.apache.org/jira/browse/REEF-1994)
  [REEF-1995](https://issues.apache.org/jira/browse/REEF-1995)

Pull Request:
  This closes #1436


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

Branch: refs/heads/REEF-335
Commit: c5196182dbd29b460080beab39961b73cad2bd70
Parents: 0f7a1cf
Author: Scott Inglis <[email protected]>
Authored: Fri Mar 16 16:14:24 2018 -0700
Committer: Markus Weimer <[email protected]>
Committed: Fri Mar 16 18:28:54 2018 -0700

----------------------------------------------------------------------
 .../Org.Apache.REEF.Bridge.CLR.DotNet.csproj          |  5 ++---
 .../Org.Apache.REEF.Bridge.JAR.DotNet.csproj          |  1 +
 .../Org.Apache.REEF.Bridge.DotNet.vcxproj             |  6 +++++-
 lang/cs/Org.Apache.REEF.Client/.gitignore             |  2 ++
 .../Org.Apache.REEF.Client.DotNet.csproj              | 11 +++++++++--
 lang/cs/Org.Apache.REEF.DotNet.sln                    | 13 +++++++++++++
 .../Org.Apache.REEF.FatNuGet.DotNet.csproj            | 14 +++++++++-----
 lang/cs/build.DotNetTest.props                        |  3 +++
 8 files changed, 44 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/reef/blob/c5196182/lang/cs/Org.Apache.REEF.Bridge.CLR/Org.Apache.REEF.Bridge.CLR.DotNet.csproj
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Bridge.CLR/Org.Apache.REEF.Bridge.CLR.DotNet.csproj 
b/lang/cs/Org.Apache.REEF.Bridge.CLR/Org.Apache.REEF.Bridge.CLR.DotNet.csproj
index 2260546..7d149d9 100644
--- 
a/lang/cs/Org.Apache.REEF.Bridge.CLR/Org.Apache.REEF.Bridge.CLR.DotNet.csproj
+++ 
b/lang/cs/Org.Apache.REEF.Bridge.CLR/Org.Apache.REEF.Bridge.CLR.DotNet.csproj
@@ -54,10 +54,9 @@ under the License.
     <ProjectReference 
Include="..\Org.Apache.REEF.Utilities\Org.Apache.REEF.Utilities.DotNet.csproj" 
/>
     <ProjectReference 
Include="..\Org.Apache.REEF.Wake\Org.Apache.REEF.Wake.DotNet.csproj" />
     <ProjectReference 
Include="..\Org.Apache.REEF.IO\Org.Apache.REEF.IO.DotNet.csproj" />
-</ItemGroup>
-
+  </ItemGroup>
   <!-- REEF-1893, custom task needs to be moved into a binary, note to remove 
DependsOnTargets="RestorePackages" in AvroCodeGeneration.targets
   <Import Project="$(SolutionDir)\AvroCodeGeneration.targets" 
Condition="Exists('$(SolutionDir)\AvroCodeGeneration.targets')" />
   -->
   <Import Project="..\build.DotNet.targets" />
-</Project>
+</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/reef/blob/c5196182/lang/cs/Org.Apache.REEF.Bridge.JAR/Org.Apache.REEF.Bridge.JAR.DotNet.csproj
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Bridge.JAR/Org.Apache.REEF.Bridge.JAR.DotNet.csproj 
b/lang/cs/Org.Apache.REEF.Bridge.JAR/Org.Apache.REEF.Bridge.JAR.DotNet.csproj
index 8525900..58ba70a 100644
--- 
a/lang/cs/Org.Apache.REEF.Bridge.JAR/Org.Apache.REEF.Bridge.JAR.DotNet.csproj
+++ 
b/lang/cs/Org.Apache.REEF.Bridge.JAR/Org.Apache.REEF.Bridge.JAR.DotNet.csproj
@@ -22,6 +22,7 @@ under the License.
   </PropertyGroup>
   <Import Project="..\build.DotNet.props" />
   <PropertyGroup>
+    <IsPackable>false</IsPackable>
     
<OutputPath>$(BinDir)$(Configuration)\Org.Apache.REEF.Bridge.JAR\</OutputPath>
   </PropertyGroup>
   <Import Project="..\build.DotNet.targets" />

http://git-wip-us.apache.org/repos/asf/reef/blob/c5196182/lang/cs/Org.Apache.REEF.Bridge/Org.Apache.REEF.Bridge.DotNet.vcxproj
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Bridge/Org.Apache.REEF.Bridge.DotNet.vcxproj 
b/lang/cs/Org.Apache.REEF.Bridge/Org.Apache.REEF.Bridge.DotNet.vcxproj
index 7227a7a..23dc0cb 100644
--- a/lang/cs/Org.Apache.REEF.Bridge/Org.Apache.REEF.Bridge.DotNet.vcxproj
+++ b/lang/cs/Org.Apache.REEF.Bridge/Org.Apache.REEF.Bridge.DotNet.vcxproj
@@ -40,7 +40,7 @@ under the License.
     <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
     <Keyword>ManagedCProj</Keyword>
     <RootNamespace>Org.Apache.REEF.Bridge</RootNamespace>
-    <WindowsTargetPlatformVersion Condition="'$(MSBuildAssemblyVersion)' >= 
'15.0'">10.0.15063.0</WindowsTargetPlatformVersion>
+    <WindowsTargetPlatformVersion Condition="'$(MSBuildAssemblyVersion)' &gt;= 
'15.0'">10.0.15063.0</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <!--
@@ -202,4 +202,8 @@ under the License.
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
+  
+  <!-- Adds an empty pack target so that this project is skipped when packing. 
-->
+  <Target Name="Pack">
+  </Target>
 </Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/reef/blob/c5196182/lang/cs/Org.Apache.REEF.Client/.gitignore
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Client/.gitignore 
b/lang/cs/Org.Apache.REEF.Client/.gitignore
new file mode 100644
index 0000000..d1d8150
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Client/.gitignore
@@ -0,0 +1,2 @@
+# Temp file generated during the build
+Resources.DotNet.resx
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/reef/blob/c5196182/lang/cs/Org.Apache.REEF.Client/Org.Apache.REEF.Client.DotNet.csproj
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Client/Org.Apache.REEF.Client.DotNet.csproj 
b/lang/cs/Org.Apache.REEF.Client/Org.Apache.REEF.Client.DotNet.csproj
index f425468..0fdbfd7 100644
--- a/lang/cs/Org.Apache.REEF.Client/Org.Apache.REEF.Client.DotNet.csproj
+++ b/lang/cs/Org.Apache.REEF.Client/Org.Apache.REEF.Client.DotNet.csproj
@@ -55,9 +55,16 @@ under the License.
     <Reference Include="System.Xml.Linq" />
     <Reference Include="System.Runtime.Serialization" />
   </ItemGroup>
+
+  <!-- Project Reference conditionals allow for targeting specific projects 
based upon the target framework. -->
+  <ItemGroup Condition="'$(TargetFramework)' == 'net452'">
+    <ProjectReference 
Include="..\Org.Apache.REEF.Bridge\Org.Apache.REEF.Bridge.DotNet.vcxproj" />
+  </ItemGroup>
+  <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
+    <ProjectReference 
Include="..\Org.Apache.REEF.Bridge.CLR\Org.Apache.REEF.Bridge.CLR.DotNet.csproj"
 />
+  </ItemGroup>
+
   <ItemGroup>
-    <ProjectReference Condition="'$(EnableBuildDotNet)' == 'false'" 
Include="..\Org.Apache.REEF.Bridge\Org.Apache.REEF.Bridge.DotNet.vcxproj" />
-    <ProjectReference Condition="'$(EnableBuildDotNet)' == 'true'" 
Include="..\Org.Apache.REEF.Bridge.CLR\Org.Apache.REEF.Bridge.CLR.DotNet.csproj"
 />
     <ProjectReference 
Include="..\Org.Apache.REEF.Utilities\Org.Apache.REEF.Utilities.DotNet.csproj" 
/>
     <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/c5196182/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 e47b869..3d612f1 100644
--- a/lang/cs/Org.Apache.REEF.DotNet.sln
+++ b/lang/cs/Org.Apache.REEF.DotNet.sln
@@ -5,6 +5,7 @@ VisualStudioVersion = 15.0.27130.2027
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = 
"Org.Apache.REEF.Bridge.DotNet", 
"Org.Apache.REEF.Bridge\Org.Apache.REEF.Bridge.DotNet.vcxproj", 
"{6C7325D1-EBB6-4642-B34F-B66F46152230}"
        ProjectSection(ProjectDependencies) = postProject
+               {4AFF480F-006F-4229-8565-DB8F0E5F0C1D} = 
{4AFF480F-006F-4229-8565-DB8F0E5F0C1D}
                {448A0D5F-A8DE-4CAA-8224-0A9A63A9392E} = 
{448A0D5F-A8DE-4CAA-8224-0A9A63A9392E}
        EndProjectSection
 EndProject
@@ -71,6 +72,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = 
"Org.Apache.REEF.Network.Exa
 EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = 
"Org.Apache.REEF.Tests.DotNet", 
"Org.Apache.REEF.Tests\Org.Apache.REEF.Tests.DotNet.csproj", 
"{C80B4A96-BAAD-4526-921C-FB5DADBC135E}"
 EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = 
"Org.Apache.REEF.FatNuGet.DotNet", 
"Org.Apache.REEF.FatNuGet\Org.Apache.REEF.FatNuGet.DotNet.csproj", 
"{F7D5EAB5-65F8-45B5-9318-60EC311E08C6}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}}") = 
"Org.Apache.REEF.Bridge.CLR.DotNet", 
"Org.Apache.REEF.Bridge.CLR\Org.Apache.REEF.Bridge.CLR.DotNet.csproj", 
"{81575917-C673-4E6F-9CF1-0DD35FC5E717}"
+EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
                Debug|x64 = Debug|x64
@@ -201,6 +206,14 @@ Global
                {C80B4A96-BAAD-4526-921C-FB5DADBC135E}.Debug|x64.Build.0 = 
Debug|x64
                {C80B4A96-BAAD-4526-921C-FB5DADBC135E}.Release|x64.ActiveCfg = 
Release|x64
                {C80B4A96-BAAD-4526-921C-FB5DADBC135E}.Release|x64.Build.0 = 
Release|x64
+               {F7D5EAB5-65F8-45B5-9318-60EC311E08C6}.Debug|x64.ActiveCfg = 
Debug|x64
+               {F7D5EAB5-65F8-45B5-9318-60EC311E08C6}.Debug|x64.Build.0 = 
Debug|x64
+               {F7D5EAB5-65F8-45B5-9318-60EC311E08C6}.Release|x64.ActiveCfg = 
Release|x64
+               {F7D5EAB5-65F8-45B5-9318-60EC311E08C6}.Release|x64.Build.0 = 
Release|x64
+               {81575917-C673-4E6F-9CF1-0DD35FC5E717}.Debug|x64.ActiveCfg = 
Debug|x64
+               {81575917-C673-4E6F-9CF1-0DD35FC5E717}.Debug|x64.Build.0 = 
Debug|x64
+               {81575917-C673-4E6F-9CF1-0DD35FC5E717}.Release|x64.ActiveCfg = 
Release|x64
+               {81575917-C673-4E6F-9CF1-0DD35FC5E717}.Release|x64.Build.0 = 
Release|x64
        EndGlobalSection
        GlobalSection(SolutionProperties) = preSolution
                HideSolutionNode = FALSE

http://git-wip-us.apache.org/repos/asf/reef/blob/c5196182/lang/cs/Org.Apache.REEF.FatNuGet/Org.Apache.REEF.FatNuGet.DotNet.csproj
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.FatNuGet/Org.Apache.REEF.FatNuGet.DotNet.csproj 
b/lang/cs/Org.Apache.REEF.FatNuGet/Org.Apache.REEF.FatNuGet.DotNet.csproj
index 0040d03..5b72421 100644
--- a/lang/cs/Org.Apache.REEF.FatNuGet/Org.Apache.REEF.FatNuGet.DotNet.csproj
+++ b/lang/cs/Org.Apache.REEF.FatNuGet/Org.Apache.REEF.FatNuGet.DotNet.csproj
@@ -19,7 +19,7 @@ under the License.
 -->
   <PropertyGroup>
     <AssemblyName>Org.Apache.REEF.FatNuGet</AssemblyName>
-    <Description>Provide single package which contains all necessary 
REEF/WAKE/TANG projects./Description>
+    <Description>Provide single package which contains all necessary 
REEF/WAKE/TANG projects.</Description>
     <PackageTags>Single package which contains all Reef/Wake/Tang 
projects</PackageTags>
   </PropertyGroup>
   <Import Project="..\build.DotNetLibrary.props" />
@@ -32,11 +32,16 @@ under the License.
     <Reference Include="System" />
     <Reference Include="System.Core" />
   </ItemGroup>
+
+    <!-- Project Reference conditionals allow for targeting specific projects 
based upon the target framework. -->
+  <ItemGroup Condition="'$(TargetFramework)' == 'net452'">
+    <!-- Evaluator as a .netcoreapp can not be linked by a .netstandard 
library, therefore this is only linked for net45 -->
+    <ProjectReference 
Include="..\Org.Apache.REEF.Evaluator\Org.Apache.REEF.Evaluator.DotNet.csproj" 
/>
+  </ItemGroup>
   <ItemGroup>
     <ProjectReference 
Include="..\Org.Apache.REEF.Client\Org.Apache.REEF.Client.DotNet.csproj" />
     <ProjectReference 
Include="..\Org.Apache.REEF.Common\Org.Apache.REEF.Common.DotNet.csproj" />
     <ProjectReference 
Include="..\Org.Apache.REEF.Driver\Org.Apache.REEF.Driver.DotNet.csproj" />
-    <ProjectReference 
Include="..\Org.Apache.REEF.Evaluator\Org.Apache.REEF.Evaluator.DotNet.csproj" 
/>
     <ProjectReference 
Include="..\Org.Apache.REEF.Examples\Org.Apache.REEF.Examples.DotNet.csproj" />
     <ProjectReference 
Include="..\Org.Apache.REEF.IMRU\Org.Apache.REEF.IMRU.DotNet.csproj" />
     <ProjectReference 
Include="..\Org.Apache.REEF.IO\Org.Apache.REEF.IO.DotNet.csproj" />
@@ -46,6 +51,5 @@ under the License.
     <ProjectReference 
Include="..\Org.Apache.REEF.Wake\Org.Apache.REEF.Wake.DotNet.csproj" />
     <ProjectReference 
Include="..\Org.Apache.REEF.IMRU.Examples\Org.Apache.REEF.IMRU.Examples.DotNet.csproj"
 />
   </ItemGroup>
-  <Import Project="..\build.DotNet.targets"/>
-</Project>
-
+  <Import Project="..\build.DotNet.targets" />
+</Project>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/reef/blob/c5196182/lang/cs/build.DotNetTest.props
----------------------------------------------------------------------
diff --git a/lang/cs/build.DotNetTest.props b/lang/cs/build.DotNetTest.props
index d7c58b6..467d73a 100644
--- a/lang/cs/build.DotNetTest.props
+++ b/lang/cs/build.DotNetTest.props
@@ -21,5 +21,8 @@ under the License.
 <PropertyGroup>
   <TargetFrameworks>net452</TargetFrameworks>
   <TargetFrameworks Condition="'$(OS)' != 
'Windows_NT'">netcoreapp2.0</TargetFrameworks>
+
+  <!-- Set this attribute to prevent test projects from being packaged -->
+  <IsTestProject>true</IsTestProject>
 </PropertyGroup>
 </Project>

Reply via email to