From 087b1e605d56b072ea23b94d587b0258727b7a1c Mon Sep 17 00:00:00 2001 From: Jackie Ng Date: Fri, 16 Jun 2017 22:55:37 +1000 Subject: [PATCH] #22: Target netstandard1.6 for test projects and fix various DNXCORE-isms that are no longer relevant --- build.cmd | 2 +- envsetupsdk.cmd | 1 + src/Test/Dnx/src/TestCommon/Assert.cs | 12 ------- src/Test/Dnx/src/TestCommon/TestCommon.csproj | 35 +------------------ src/Test/Dnx/src/TestMapGuide/Program.cs | 14 -------- .../TestMapGuide/Properties/AssemblyInfo.cs | 23 ------------ .../Dnx/src/TestMapGuide/TestMapGuide.xproj | 20 ----------- src/Test/Dnx/src/TestMapGuide/project.json | 33 ----------------- .../TestMapGuideApi/TestMapGuideApi.csproj | 23 ++---------- src/Test/Dnx/src/TestRunner/Program.cs | 4 --- src/Test/Dnx/src/TestRunner/TestRunner.csproj | 19 +--------- 11 files changed, 6 insertions(+), 180 deletions(-) delete mode 100644 src/Test/Dnx/src/TestMapGuide/Program.cs delete mode 100644 src/Test/Dnx/src/TestMapGuide/Properties/AssemblyInfo.cs delete mode 100644 src/Test/Dnx/src/TestMapGuide/TestMapGuide.xproj delete mode 100644 src/Test/Dnx/src/TestMapGuide/project.json diff --git a/build.cmd b/build.cmd index 05f5974..4378265 100644 --- a/build.cmd +++ b/build.cmd @@ -14,7 +14,7 @@ popd pushd src\Bindings\DotNet\MapGuideDotNetApi call dotnet restore if errorlevel 1 goto error -call dotnet pack --configuration Release +call dotnet pack --configuration Release --include-source --include-symbols /p:PackageVersion=%MG_VER_TRIPLET% if errorlevel 1 goto error popd goto end diff --git a/envsetupsdk.cmd b/envsetupsdk.cmd index 59e2aad..695b84f 100644 --- a/envsetupsdk.cmd +++ b/envsetupsdk.cmd @@ -4,6 +4,7 @@ SET MG_VER_MINOR=%2 SET MG_VER_REV=%3 SET MG_VER_BUILD=%4 SET MG_VERSION=%1.%2 +SET MG_VER_TRIPLET=%1.%2.%3 SET SWIG_TOOL_PATH=D:\swigwin-3.0.12 SET MG_SDK_DIR=sdk/%MG_VERSION% diff --git a/src/Test/Dnx/src/TestCommon/Assert.cs b/src/Test/Dnx/src/TestCommon/Assert.cs index e257395..987201c 100644 --- a/src/Test/Dnx/src/TestCommon/Assert.cs +++ b/src/Test/Dnx/src/TestCommon/Assert.cs @@ -1,25 +1,13 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; namespace OSGeo.MapGuide.Test.Common { -#if !DNXCORE50 - [Serializable] -#endif public class AssertException : Exception { public AssertException() { } public AssertException(string message) : base(message) { } public AssertException(string message, Exception inner) : base(message, inner) { } -#if !DNXCORE50 - protected AssertException( - System.Runtime.Serialization.SerializationInfo info, - System.Runtime.Serialization.StreamingContext context) - : base(info, context) - { } -#endif } public class Assert diff --git a/src/Test/Dnx/src/TestCommon/TestCommon.csproj b/src/Test/Dnx/src/TestCommon/TestCommon.csproj index 5f92542..d10400c 100644 --- a/src/Test/Dnx/src/TestCommon/TestCommon.csproj +++ b/src/Test/Dnx/src/TestCommon/TestCommon.csproj @@ -3,7 +3,7 @@ TestCommon Class Library OSGeo - dnx451;dnxcore50 + netstandard1.6 TestCommon TestCommon false @@ -14,37 +14,4 @@ false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Test/Dnx/src/TestMapGuide/Program.cs b/src/Test/Dnx/src/TestMapGuide/Program.cs deleted file mode 100644 index ab7d153..0000000 --- a/src/Test/Dnx/src/TestMapGuide/Program.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace TestMapGuide -{ - public class Program - { - public static void Main(string[] args) - { - } - } -} diff --git a/src/Test/Dnx/src/TestMapGuide/Properties/AssemblyInfo.cs b/src/Test/Dnx/src/TestMapGuide/Properties/AssemblyInfo.cs deleted file mode 100644 index 3b9ec74..0000000 --- a/src/Test/Dnx/src/TestMapGuide/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("TestMapGuide")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("TestMapGuide")] -[assembly: AssemblyCopyright("Copyright © 2015")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("d888b391-a169-4b5a-8741-def21d995cee")] diff --git a/src/Test/Dnx/src/TestMapGuide/TestMapGuide.xproj b/src/Test/Dnx/src/TestMapGuide/TestMapGuide.xproj deleted file mode 100644 index dde237b..0000000 --- a/src/Test/Dnx/src/TestMapGuide/TestMapGuide.xproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - - d888b391-a169-4b5a-8741-def21d995cee - TestMapGuide - ..\..\artifacts\obj\$(MSBuildProjectName) - ..\..\artifacts\bin\$(MSBuildProjectName)\ - - - - 2.0 - - - diff --git a/src/Test/Dnx/src/TestMapGuide/project.json b/src/Test/Dnx/src/TestMapGuide/project.json deleted file mode 100644 index 175b97c..0000000 --- a/src/Test/Dnx/src/TestMapGuide/project.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "version": "1.0.0-*", - "description": "TestMapGuide Console Application", - "authors": [ "Jackie Ng" ], - "tags": [ "" ], - "projectUrl": "", - "licenseUrl": "", - - "compilationOptions": { - "emitEntryPoint": true - }, - - "dependencies": { - "TestCommon": "1.0.0-*" - }, - - "commands": { - "TestMapGuide": "TestMapGuide" - }, - - "frameworks": { - "dnx451": { }, - "dnxcore50": { - "dependencies": { - "Microsoft.CSharp": "4.0.1-beta-23516", - "System.Collections": "4.0.11-beta-23516", - "System.Console": "4.0.0-beta-23516", - "System.Linq": "4.0.1-beta-23516", - "System.Threading": "4.0.11-beta-23516" - } - } - } -} diff --git a/src/Test/Dnx/src/TestMapGuideApi/TestMapGuideApi.csproj b/src/Test/Dnx/src/TestMapGuideApi/TestMapGuideApi.csproj index 50641e6..80261b5 100644 --- a/src/Test/Dnx/src/TestMapGuideApi/TestMapGuideApi.csproj +++ b/src/Test/Dnx/src/TestMapGuideApi/TestMapGuideApi.csproj @@ -3,7 +3,7 @@ TestMapGuideApi Class Library OSGeo - dnx451;dnxcore50 + netstandard1.6 TestMapGuideApi TestMapGuideApi false @@ -19,26 +19,7 @@ - - - - - - - - - - - - - - - - - - - - + diff --git a/src/Test/Dnx/src/TestRunner/Program.cs b/src/Test/Dnx/src/TestRunner/Program.cs index 984991f..c6cfd19 100644 --- a/src/Test/Dnx/src/TestRunner/Program.cs +++ b/src/Test/Dnx/src/TestRunner/Program.cs @@ -51,11 +51,7 @@ public MgLayerBase CreateLayer(MgResourceIdentifier resId) } //Usage: MgTestRunner.exe [test log path] -#if DNXCORE50 - static int Main(string[] args) -#else static void Main(string[] args) -#endif { if (args.Length >= 2 && args.Length <= 3) { diff --git a/src/Test/Dnx/src/TestRunner/TestRunner.csproj b/src/Test/Dnx/src/TestRunner/TestRunner.csproj index 17ac67c..9d79331 100644 --- a/src/Test/Dnx/src/TestRunner/TestRunner.csproj +++ b/src/Test/Dnx/src/TestRunner/TestRunner.csproj @@ -3,7 +3,7 @@ TestRunner Console Application OSGeo - dnx451;dnxcore50 + netcoreapp1.1 TestRunner Exe TestRunner @@ -19,21 +19,4 @@ - - - - - - - - - - - - - - - - -