Skip to content

Commit

Permalink
#22: Target netstandard1.6 for test projects and fix various DNXCORE-…
Browse files Browse the repository at this point in the history
…isms that are no longer relevant
  • Loading branch information
jumpinjackie committed Jun 16, 2017
1 parent f5b399c commit 087b1e6
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 180 deletions.
2 changes: 1 addition & 1 deletion build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions envsetupsdk.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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%
Expand Down
12 changes: 0 additions & 12 deletions src/Test/Dnx/src/TestCommon/Assert.cs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
35 changes: 1 addition & 34 deletions src/Test/Dnx/src/TestCommon/TestCommon.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Description>TestCommon Class Library</Description>
<Authors>OSGeo</Authors>
<TargetFrameworks>dnx451;dnxcore50</TargetFrameworks>
<TargetFrameworks>netstandard1.6</TargetFrameworks>
<AssemblyName>TestCommon</AssemblyName>
<PackageId>TestCommon</PackageId>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
Expand All @@ -14,37 +14,4 @@
<GenerateAssemblyCopyrightAttribute>false</GenerateAssemblyCopyrightAttribute>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.PlatformAbstractions" Version="1.0.0" />
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.0.0" />
<PackageReference Include="System.Globalization" Version="4.0.11" />
<PackageReference Include="System.IO" Version="4.1.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'dnx451' ">
<PackageReference Include="System.Xml.ReaderWriter" Version="4.0.11" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="1.0.1" />
<PackageReference Include="MapGuideDotNetApi" Version="3.1.0" />
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Runtime" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'dnxcore50' ">
<PackageReference Include="Microsoft.CSharp" Version="4.0.1" />
<PackageReference Include="System.Console" Version="4.0.0" />
<PackageReference Include="System.Collections" Version="4.0.11" />
<PackageReference Include="System.Collections.Specialized" Version="4.0.1" />
<PackageReference Include="System.Linq" Version="4.1.0" />
<PackageReference Include="System.Runtime" Version="4.1.0" />
<PackageReference Include="System.Threading" Version="4.0.11" />
<PackageReference Include="System.Reflection" Version="4.1.0" />
<PackageReference Include="System.Reflection.TypeExtensions" Version="4.1.0" />
<PackageReference Include="System.Xml.XmlDocument" Version="4.0.1" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="1.0.1" />
<PackageReference Include="MapGuideDotNetApi" Version="3.1.0" />
</ItemGroup>

</Project>
14 changes: 0 additions & 14 deletions src/Test/Dnx/src/TestMapGuide/Program.cs

This file was deleted.

23 changes: 0 additions & 23 deletions src/Test/Dnx/src/TestMapGuide/Properties/AssemblyInfo.cs

This file was deleted.

20 changes: 0 additions & 20 deletions src/Test/Dnx/src/TestMapGuide/TestMapGuide.xproj

This file was deleted.

33 changes: 0 additions & 33 deletions src/Test/Dnx/src/TestMapGuide/project.json

This file was deleted.

23 changes: 2 additions & 21 deletions src/Test/Dnx/src/TestMapGuideApi/TestMapGuideApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Description>TestMapGuideApi Class Library</Description>
<Authors>OSGeo</Authors>
<TargetFrameworks>dnx451;dnxcore50</TargetFrameworks>
<TargetFrameworks>netstandard1.6</TargetFrameworks>
<AssemblyName>TestMapGuideApi</AssemblyName>
<PackageId>TestMapGuideApi</PackageId>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
Expand All @@ -19,26 +19,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Reflection" Version="4.1.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'dnx451' ">
<PackageReference Include="Microsoft.Data.Sqlite" Version="1.0.1" />
<PackageReference Include="MapGuideDotNetApi" Version="3.1.0" />
<Reference Include="System.Drawing" />
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'dnxcore50' ">
<PackageReference Include="Microsoft.CSharp" Version="4.0.1" />
<PackageReference Include="System.Collections" Version="4.0.11" />
<PackageReference Include="System.Linq" Version="4.1.0" />
<PackageReference Include="System.Runtime" Version="4.1.0" />
<PackageReference Include="System.Threading" Version="4.0.11" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="1.0.1" />
<PackageReference Include="System.Threading.Thread" Version="4.0.0" />
<PackageReference Include="MapGuideDotNetApi" Version="3.1.0" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="1.1.1" />
</ItemGroup>

</Project>
4 changes: 0 additions & 4 deletions src/Test/Dnx/src/TestRunner/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,7 @@ public MgLayerBase CreateLayer(MgResourceIdentifier resId)
}

//Usage: MgTestRunner.exe <webconfig.ini path> <MENTOR_DICTIONARY_PATH> [test log path]
#if DNXCORE50
static int Main(string[] args)
#else
static void Main(string[] args)
#endif
{
if (args.Length >= 2 && args.Length <= 3)
{
Expand Down
19 changes: 1 addition & 18 deletions src/Test/Dnx/src/TestRunner/TestRunner.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Description>TestRunner Console Application</Description>
<Authors>OSGeo</Authors>
<TargetFrameworks>dnx451;dnxcore50</TargetFrameworks>
<TargetFrameworks>netcoreapp1.1</TargetFrameworks>
<AssemblyName>TestRunner</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>TestRunner</PackageId>
Expand All @@ -19,21 +19,4 @@
<ProjectReference Include="..\TestCommon\TestCommon.csproj" />
<ProjectReference Include="..\TestMapGuideApi\TestMapGuideApi.csproj" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'dnx451' ">
<PackageReference Include="MapGuideDotNetApi" Version="3.1.0" />
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'dnxcore50' ">
<PackageReference Include="Microsoft.CSharp" Version="4.0.1" />
<PackageReference Include="System.Collections" Version="4.0.11" />
<PackageReference Include="System.Console" Version="4.0.0" />
<PackageReference Include="System.Linq" Version="4.1.0" />
<PackageReference Include="System.Threading" Version="4.0.11" />
<PackageReference Include="System.Runtime.Extensions" Version="4.1.0" />
<PackageReference Include="MapGuideDotNetApi" Version="3.1.0" />
</ItemGroup>

</Project>

0 comments on commit 087b1e6

Please sign in to comment.