Skip to content

Commit 7a20bbf

Browse files
Merge pull request #78 from rjhernandez/net-standard-1.1
Net Standard 1.1 Update
2 parents f6d68ed + 6d9443b commit 7a20bbf

10 files changed

Lines changed: 37 additions & 141 deletions

File tree

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#NuGet
22
packages/
33
*.nupkg
4-
lib/*
4+
lib/*
5+
6+
#OSX
7+
.DS_Store

src/GeoJSON.Net.Tests/CoordinateReferenceSystem/LinkedCRSTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public void Ctor_Throws_ArgumentExpection_When_Href_Is_Not_Dereferencable_Uri()
6363
{
6464
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en-US");
6565
var argumentExpection = Assert.Throws<ArgumentException>(() => { var crs = new LinkedCRS("http://not-a-valid-<>-url"); });
66-
Assert.AreEqual("must be a dereferenceable URI\r\nParameter name: href", argumentExpection.Message);
66+
Assert.AreEqual($"must be a dereferenceable URI{Environment.NewLine}Parameter name: href", argumentExpection.Message);
6767
}
6868

6969
[Test]

src/GeoJSON.Net.Tests/GeoJSON.Net.Tests.csproj

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
55
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -34,13 +34,11 @@
3434
<Prefer32Bit>false</Prefer32Bit>
3535
</PropertyGroup>
3636
<ItemGroup>
37-
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
38-
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
39-
<Private>True</Private>
37+
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
38+
<HintPath>..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
4039
</Reference>
41-
<Reference Include="nunit.framework, Version=3.0.5813.39031, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
42-
<HintPath>..\packages\NUnit.3.0.1\lib\net45\nunit.framework.dll</HintPath>
43-
<Private>True</Private>
40+
<Reference Include="nunit.framework, Version=3.7.0.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
41+
<HintPath>..\packages\NUnit.3.7.0\lib\net45\nunit.framework.dll</HintPath>
4442
</Reference>
4543
<Reference Include="System" />
4644
<Reference Include="System.Core" />
@@ -129,11 +127,10 @@
129127
</ItemGroup>
130128
<ItemGroup>
131129
<ProjectReference Include="..\GeoJSON.Net\GeoJSON.Net.csproj">
132-
<Project>{7c0d45ed-681e-4dec-9910-bae1211e4889}</Project>
130+
<Project>{8af7c40e-e8c7-425f-a8b1-a4b7e74d3ca9}</Project>
133131
<Name>GeoJSON.Net</Name>
134132
</ProjectReference>
135133
</ItemGroup>
136-
<ItemGroup />
137134
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
138135
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
139136
Other similar extension points exist, see Microsoft.Common.targets.

src/GeoJSON.Net.Tests/Geometry/GeometryTests.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System;
12
using System.Collections.Generic;
23
using GeoJSON.Net.Converters;
34
using GeoJSON.Net.Geometry;
@@ -127,15 +128,15 @@ public void Can_Serialize_And_Deserialize_Geometry(IGeometryObject geometry)
127128
public void Serialization_Observes_Indenting_Setting_Of_Serializer(IGeometryObject geometry)
128129
{
129130
var json = JsonConvert.SerializeObject(geometry, Formatting.Indented);
130-
Assert.IsTrue(json.Contains("\r\n"));
131+
Assert.IsTrue(json.Contains(Environment.NewLine));
131132
}
132133

133134
[Test]
134135
[TestCaseSource(typeof(GeometryTests), nameof(Geometries))]
135136
public void Serialization_Observes_No_Indenting_Setting_Of_Serializer(IGeometryObject geometry)
136137
{
137138
var json = JsonConvert.SerializeObject(geometry, Formatting.None);
138-
Assert.IsFalse(json.Contains("\r\n"));
139+
Assert.IsFalse(json.Contains(Environment.NewLine));
139140
Assert.IsFalse(json.Contains(" "));
140141
}
141142

src/GeoJSON.Net.Tests/TestBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ protected string GetExpectedJson([CallerMemberName] string name = null)
2424
{
2525
var type = GetType().Name;
2626
var projectFolder = GetType().Namespace.Substring(AssemblyName.Length + 1);
27-
var path = Path.Combine(AssemblyDirectory, @".\", projectFolder, type + "_" + name + ".json");
27+
var path = Path.Combine(AssemblyDirectory, @"./", projectFolder, type + "_" + name + ".json");
2828

2929
if (!File.Exists(path))
3030
{
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net45" />
4-
<package id="NUnit" version="3.0.1" targetFramework="net45" />
3+
<package id="Newtonsoft.Json" version="10.0.2" targetFramework="net461" />
4+
<package id="NUnit" version="3.7.0" targetFramework="net461" />
55
</packages>

src/GeoJSON.Net.sln

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25420.1
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26430.6
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GeoJSON.Net", "GeoJSON.Net\GeoJSON.Net.csproj", "{7C0D45ED-681E-4DEC-9910-BAE1211E4889}"
7-
EndProject
86
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{7AFBD129-E5A1-48D0-B7F6-7CCD6D06AF17}"
97
ProjectSection(SolutionItems) = preProject
108
..\GeoJSON.Net.nuspec = ..\GeoJSON.Net.nuspec
@@ -14,20 +12,22 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1412
EndProject
1513
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GeoJSON.Net.Tests", "GeoJSON.Net.Tests\GeoJSON.Net.Tests.csproj", "{6C93B314-9208-4684-B873-172F7EC81689}"
1614
EndProject
15+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeoJSON.Net", "GeoJSON.Net\GeoJSON.Net.csproj", "{8AF7C40E-E8C7-425F-A8B1-A4B7E74D3CA9}"
16+
EndProject
1717
Global
1818
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1919
Debug|Any CPU = Debug|Any CPU
2020
Release|Any CPU = Release|Any CPU
2121
EndGlobalSection
2222
GlobalSection(ProjectConfigurationPlatforms) = postSolution
23-
{7C0D45ED-681E-4DEC-9910-BAE1211E4889}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24-
{7C0D45ED-681E-4DEC-9910-BAE1211E4889}.Debug|Any CPU.Build.0 = Debug|Any CPU
25-
{7C0D45ED-681E-4DEC-9910-BAE1211E4889}.Release|Any CPU.ActiveCfg = Release|Any CPU
26-
{7C0D45ED-681E-4DEC-9910-BAE1211E4889}.Release|Any CPU.Build.0 = Release|Any CPU
2723
{6C93B314-9208-4684-B873-172F7EC81689}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2824
{6C93B314-9208-4684-B873-172F7EC81689}.Debug|Any CPU.Build.0 = Debug|Any CPU
2925
{6C93B314-9208-4684-B873-172F7EC81689}.Release|Any CPU.ActiveCfg = Release|Any CPU
3026
{6C93B314-9208-4684-B873-172F7EC81689}.Release|Any CPU.Build.0 = Release|Any CPU
27+
{8AF7C40E-E8C7-425F-A8B1-A4B7E74D3CA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
28+
{8AF7C40E-E8C7-425F-A8B1-A4B7E74D3CA9}.Debug|Any CPU.Build.0 = Debug|Any CPU
29+
{8AF7C40E-E8C7-425F-A8B1-A4B7E74D3CA9}.Release|Any CPU.ActiveCfg = Release|Any CPU
30+
{8AF7C40E-E8C7-425F-A8B1-A4B7E74D3CA9}.Release|Any CPU.Build.0 = Release|Any CPU
3131
EndGlobalSection
3232
GlobalSection(SolutionProperties) = preSolution
3333
HideSolutionNode = FALSE

src/GeoJSON.Net/GeoJSON.Net.csproj

Lines changed: 12 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,18 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
33
<PropertyGroup>
4-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6-
<ProductVersion>8.0.30703</ProductVersion>
7-
<SchemaVersion>2.0</SchemaVersion>
8-
<ProjectGuid>{7C0D45ED-681E-4DEC-9910-BAE1211E4889}</ProjectGuid>
9-
<OutputType>Library</OutputType>
10-
<AppDesignerFolder>Properties</AppDesignerFolder>
11-
<RootNamespace>GeoJSON.Net</RootNamespace>
4+
<TargetFramework>netstandard1.1</TargetFramework>
125
<AssemblyName>GeoJSON.Net</AssemblyName>
13-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
14-
<FileAlignment>512</FileAlignment>
15-
<TargetFrameworkProfile>Profile259</TargetFrameworkProfile>
6+
<AssemblyVersion>0.0.0.7</AssemblyVersion>
7+
<FileVersion>0.0.0.7</FileVersion>
8+
<Description>.Net types for the GeoJSON 1.0 specs to be used with Json.Net</Description>
9+
<Authors></Authors>
10+
<Company>Joerg Battermann</Company>
11+
<Copyright>Copyright © Joerg Battermann and Contributor, 2014 - 2016</Copyright>
1612
</PropertyGroup>
17-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18-
<DebugSymbols>true</DebugSymbols>
19-
<DebugType>full</DebugType>
20-
<Optimize>false</Optimize>
21-
<OutputPath>bin\Debug\</OutputPath>
22-
<DefineConstants>DEBUG;TRACE</DefineConstants>
23-
<ErrorReport>prompt</ErrorReport>
24-
<WarningLevel>4</WarningLevel>
25-
<DocumentationFile>bin\Debug\GeoJSON.Net.XML</DocumentationFile>
26-
</PropertyGroup>
27-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28-
<DebugType>pdbonly</DebugType>
29-
<Optimize>true</Optimize>
30-
<OutputPath>bin\Release\</OutputPath>
31-
<DefineConstants>TRACE</DefineConstants>
32-
<ErrorReport>prompt</ErrorReport>
33-
<WarningLevel>4</WarningLevel>
34-
<DocumentationFile>bin\Release\GeoJSON.Net.XML</DocumentationFile>
35-
</PropertyGroup>
36-
<ItemGroup>
37-
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
38-
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\portable-net40+sl5+wp80+win8+wpa81\Newtonsoft.Json.dll</HintPath>
39-
<Private>True</Private>
40-
</Reference>
41-
<Reference Include="System" />
42-
<Reference Include="System.Core" />
43-
<Reference Include="Microsoft.CSharp" />
44-
</ItemGroup>
13+
4514
<ItemGroup>
46-
<Compile Include="Converters\CrsConverter.cs" />
47-
<Compile Include="Converters\GeoJsonConverter.cs" />
48-
<Compile Include="Converters\GeometryConverter.cs" />
49-
<Compile Include="Converters\MultiPointConverter.cs" />
50-
<Compile Include="Converters\MultiPolygonConverter.cs" />
51-
<Compile Include="Converters\PointConverter.cs" />
52-
<Compile Include="Converters\LineStringConverter.cs" />
53-
<Compile Include="Converters\PolygonConverter.cs" />
54-
<Compile Include="CoordinateReferenceSystem\DefaultCRS.cs" />
55-
<Compile Include="CoordinateReferenceSystem\LinkedCRS.cs" />
56-
<Compile Include="CoordinateReferenceSystem\CRSBase.cs" />
57-
<Compile Include="CoordinateReferenceSystem\CRSType.cs" />
58-
<Compile Include="CoordinateReferenceSystem\ICRSObject.cs" />
59-
<Compile Include="CoordinateReferenceSystem\NamedCRS.cs" />
60-
<Compile Include="CoordinateReferenceSystem\UnspecifiedCRS.cs" />
61-
<Compile Include="DoubleTenDecimalPlaceComparer.cs" />
62-
<Compile Include="GeoJSONObject.cs" />
63-
<Compile Include="Geometry\GeometryCollection.cs" />
64-
<Compile Include="Geometry\IPosition.cs" />
65-
<Compile Include="Geometry\MultiLineString.cs" />
66-
<Compile Include="Geometry\LineString.cs" />
67-
<Compile Include="Geometry\MultiPoint.cs" />
68-
<Compile Include="GeoJSONObjectType.cs" />
69-
<Compile Include="Geometry\GeographicPosition.cs" />
70-
<Compile Include="Exceptions\ParsingException.cs" />
71-
<Compile Include="Feature\Feature.cs" />
72-
<Compile Include="Feature\FeatureCollection.cs" />
73-
<Compile Include="Geometry\IGeometryObject.cs" />
74-
<Compile Include="Geometry\MultiPolygon.cs" />
75-
<Compile Include="Geometry\Point.cs" />
76-
<Compile Include="Geometry\Polygon.cs" />
77-
<Compile Include="Geometry\Position.cs" />
78-
<Compile Include="IGeoJSONObject.cs" />
79-
<Compile Include="NullableDoubleTenDecimalPlaceComparer.cs" />
80-
<Compile Include="Properties\AssemblyInfo.cs" />
15+
<PackageReference Include="Newtonsoft.Json" Version="10.0.2" />
8116
</ItemGroup>
82-
<ItemGroup>
83-
<None Include="packages.config" />
84-
</ItemGroup>
85-
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
86-
<PropertyGroup>
87-
<PostBuildEvent>copy $(SolutionDir)$(ProjectName)\$(OutDir)$(TargetName).xml $(SolutionDir)..\lib
88-
copy $(SolutionDir)$(ProjectName)\$(OutDir)$(TargetName).dll $(SolutionDir)..\lib</PostBuildEvent>
89-
</PropertyGroup>
90-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
91-
Other similar extension points exist, see Microsoft.Common.targets.
92-
<Target Name="BeforeBuild">
93-
</Target>
94-
<Target Name="AfterBuild">
95-
</Target>
96-
-->
17+
9718
</Project>

src/GeoJSON.Net/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/GeoJSON.Net/packages.config

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)