You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@reef.apache.org by we...@apache.org on 2017/04/20 15:46:21 UTC

reef git commit: [REEF-1578] Introduce DotNet build files for Utilities and Tang

Repository: reef
Updated Branches:
  refs/heads/master 326ad9ab7 -> 0434969aa


[REEF-1578] Introduce DotNet build files for Utilities and Tang

This check-in starts the conversion of existing VS projects to the new dotnet
project format supported by Visual Studio 2017 and the dotnet command line.

This starts with conversion of the Utilities and Tang projects, providing a
`.DotNet.` project file that sits side-by-dside with the existing .net 4.5
project. This allows the existing projects to still be used during the
transition to the new project format.

With the new project format, a single project supports building multiple dotnet
frameworks. This provides the framework that will be followed with the other
projects. We are targeting `.net451`, `.net46` and `.netstarndard`/`.netcore`
where possible as there are some projects that cannot convert to .net core yet
(Tang is one example of this).

Since Utilities now targets .netstandard 2.0 - this addresses REEF-1578.

To build the new projects, the dotnet core cli tools will be required.
Details on this provided in the BUILD.md file. There is also a side-by-side
DotNet solution file that is used to build all migrated DotNet projects.

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

Pull request:
  This closes #1279


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

Branch: refs/heads/master
Commit: 0434969aa0cb5d942370a284aa28f43026cd86fe
Parents: 326ad9a
Author: Scott Inglis <ms...@gmail.com>
Authored: Wed Apr 19 19:37:33 2017 -0700
Committer: Markus Weimer <we...@apache.org>
Committed: Thu Apr 20 08:39:48 2017 -0700

----------------------------------------------------------------------
 lang/cs/BUILD.md                                | 43 ++++++++++++++++++
 lang/cs/Org.Apache.REEF.DotNet.sln              | 28 ++++++++++++
 .../Org.Apache.REEF.Tang.DotNet.csproj          | 39 +++++++++++++++++
 .../Org.Apache.REEF.Utilities.DotNet.csproj     | 28 ++++++++++++
 lang/cs/build.DotNet.props                      | 46 ++++++++++++++++++++
 5 files changed, 184 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/reef/blob/0434969a/lang/cs/BUILD.md
----------------------------------------------------------------------
diff --git a/lang/cs/BUILD.md b/lang/cs/BUILD.md
index 4700f2b..dad75d5 100644
--- a/lang/cs/BUILD.md
+++ b/lang/cs/BUILD.md
@@ -43,6 +43,8 @@ Prerequisites
 Instructions
 ------------
 
+***For Building projects:***
+
 To build and run tests in Visual Studio on local machine:
 
 1. Open solution `.\lang\cs\Org.Apache.REEF.sln`
@@ -61,6 +63,47 @@ To run .NET tests on local machine from command line, execute
 
 `TestRunner.proj` already has a filter set up to exclude Yarn tests.
 
+***For Building DotNet projects:***
+
+We are in the process of converting the C# support to use dotnet core as well as support for Visual Studio 2017. As a result 
+there are <projectname>.DotNet.csproj files that sit beside the existing csproj files. To build the dotnet projects, you will need 
+the .NET Core SDK installed on your machine as well as Visual Studio 2017. 
+
+**Note:** Building in Visual Studio 2017 is not yet supported. You will need to build at the command line using the .NET Core SDK tools (dotnet). However Visual Studio 2017 does support opening the DotNet solution. .NET Core applications are supported on both Windows and Linux, the projects will only build fully on Windows since they do target the .net45 framework. 
+
+The .NET Core SDK tools are located here:
+
+[https://github.com/dotnet/cli](https://github.com/dotnet/cli)
+
+Scroll down the page to access the latest builds of .NET Core SDK, download the Windows X64 installer. 
+
+At the time of writing the current version used is 2.0.0-preview1-005825. Any version that is equal or newer should also work.
+
+To build from Visual Studio 2017:
+
+This is not currently supported and you will need to build from the command line however VS2017 can be used to view the solution. 
+
+To open the project in VS2017, open the solution `.\lang\cs\Org.Apache.REEF.DotNet.sln`.
+
+To build from the command line, in the `reef\lang\cs` path, type the following:
+
+    dotnet clean Org.Apache.REEF.DotNet.sln
+    dotnet restore Org.Apache.REEF.DotNet.sln
+    dotnet build Org.Apache.REEF.DotNet.sln
+
+ * `clean` will clean any previously built binary
+ * `restore` restores nuget dependencies
+ * `build` builds the solution
+
+To build nuget packages, type the following:
+
+ * `dotnet pack Org.Apache.REEF.DotNet.sln`
+
+This will build nuget packages for each project.
+
+Projects will build out to `reef\bin\<AssemblyName>` and will contain all the platforms that the project supports. Each project 
+is in various stages as they are transitioning to dotnet core 2.0 - therefore they may only build .net45 and .net46 assemblies.
+
 Continuous Integration
 ----------------------
 

http://git-wip-us.apache.org/repos/asf/reef/blob/0434969a/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
new file mode 100644
index 0000000..c10a132
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.DotNet.sln
@@ -0,0 +1,28 @@
+\ufeff
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.26228.10
+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}"
+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
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|x64 = Debug|x64
+		Release|x64 = Release|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{FE4CEA75-2F26-4C97-B256-375AA698B4A9}.Debug|x64.ActiveCfg = Debug|x64
+		{FE4CEA75-2F26-4C97-B256-375AA698B4A9}.Debug|x64.Build.0 = Debug|x64
+		{FE4CEA75-2F26-4C97-B256-375AA698B4A9}.Release|x64.ActiveCfg = Release|x64
+		{FE4CEA75-2F26-4C97-B256-375AA698B4A9}.Release|x64.Build.0 = Release|x64
+		{16E1218C-9A3C-49E2-A939-C29944BBB72E}.Debug|x64.ActiveCfg = Debug|x64
+		{16E1218C-9A3C-49E2-A939-C29944BBB72E}.Debug|x64.Build.0 = Debug|x64
+		{16E1218C-9A3C-49E2-A939-C29944BBB72E}.Release|x64.ActiveCfg = Release|x64
+		{16E1218C-9A3C-49E2-A939-C29944BBB72E}.Release|x64.Build.0 = Release|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

http://git-wip-us.apache.org/repos/asf/reef/blob/0434969a/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
new file mode 100644
index 0000000..282077d
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Tang/Org.Apache.REEF.Tang.DotNet.csproj
@@ -0,0 +1,39 @@
+\ufeff<Project Sdk="Microsoft.NET.Sdk">
+<!--
+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.
+-->
+  <PropertyGroup>
+    <AssemblyName>Org.Apache.REEF.Tang</AssemblyName>
+    <Description>Tang is a dependency injection framework</Description>
+    <PackageTags> Apache REEF tang dependency injection</PackageTags>
+    <TargetFrameworks>net46;net451</TargetFrameworks>
+  </PropertyGroup>
+  <Import Project="..\build.DotNet.props" />
+  <ItemGroup>
+    <PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
+    <PackageReference Include="protobuf-net" Version="$(ProtobufVersion)" />
+    <PackageReference Include="Microsoft.Hadoop.Avro" Version="$(AvroVersion)" />
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Runtime.Serialization" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Org.Apache.REEF.Utilities\Org.Apache.Reef.Utilities.DotNet.csproj" />
+  </ItemGroup>
+</Project>

http://git-wip-us.apache.org/repos/asf/reef/blob/0434969a/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
new file mode 100644
index 0000000..2a09fd4
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.REEF.Utilities.DotNet.csproj
@@ -0,0 +1,28 @@
+\ufeff<Project Sdk="Microsoft.NET.Sdk">
+<!--
+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.
+-->
+  <PropertyGroup>
+    <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;net46;net451</TargetFrameworks>
+  </PropertyGroup>
+  <Import Project="..\build.DotNet.props" />
+  <ItemGroup>
+      <PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
+  </ItemGroup>
+</Project>

http://git-wip-us.apache.org/repos/asf/reef/blob/0434969a/lang/cs/build.DotNet.props
----------------------------------------------------------------------
diff --git a/lang/cs/build.DotNet.props b/lang/cs/build.DotNet.props
new file mode 100644
index 0000000..cd58b9c
--- /dev/null
+++ b/lang/cs/build.DotNet.props
@@ -0,0 +1,46 @@
+<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.
+-->
+  <PropertyGroup>
+    <Version>0.16.0</Version>
+    <Authors>Apache Software Foundation</Authors>
+    <Owners>The Apache REEF project</Owners>
+    <Product>Apache REEF</Product>
+    <ProductId>$(AssemblyName)</ProductId>
+    <AssemblyVersion>$(Version)</AssemblyVersion>
+    <FileVersion>$(Version)</FileVersion>
+    <NeutralLanguage>en</NeutralLanguage>
+    <Copyright>The Apache Software Foundation</Copyright>
+    <PackageLicenseUrl>https://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
+    <PackageProjectUrl>https://reef.apache.org</PackageProjectUrl>
+    <PackageIconUrl>https://reef.apache.org/ApacheREEF_logo_no_margin_small.png</PackageIconUrl>
+    <RepositoryUrl>https://github.com/apache/reef.git</RepositoryUrl>
+    <PackageReleaseNotes>Contact the Apache REEF development alias dev@reef.apache.org for questions or issues.</PackageReleaseNotes>
+    <DefaultItemExcludes>$(DefaultItemExcludes);**/AssemblyInfo.cs;packages.config;*.nuspec</DefaultItemExcludes>
+  </PropertyGroup>
+
+  <PropertyGroup>
+    <OutputPath>..\bin\$(AssemblyName)</OutputPath>
+    <AvroVersion>1.5.6</AvroVersion>
+    <NewtonsoftJsonVersion>10.0.1</NewtonsoftJsonVersion>
+    <ProtobufVersion>2.0.0.668</ProtobufVersion>
+    <RxVersion>2.2.5</RxVersion>
+    <StyleCopVersion>4.7.49.1</StyleCopVersion>
+    <NSubstituteVersion>1.8.2.0</NSubstituteVersion>
+  </PropertyGroup>
+
+</Project>