diff --git a/Build/build.ps1 b/Build/build.ps1
index 53b1624d..3e215fa3 100644
--- a/Build/build.ps1
+++ b/Build/build.ps1
@@ -270,7 +270,7 @@ function NetCliTests($build)
Write-Host -ForegroundColor Green "Ensuring test project builds for $name"
Write-Host
- exec { dotnet test $projectPath -f netcoreapp1.0 -c Release -l trx | Out-Default }
+ exec { dotnet test $projectPath -f netcoreapp1.1 -c Release -l trx | Out-Default }
copy-item -Path "$location\TestResults\*.trx" -Destination $workingDir
}
finally
diff --git a/Src/Newtonsoft.Json.Roslyn.sln b/Src/Newtonsoft.Json.Roslyn.sln
index b3f0217f..cbc9e19e 100644
--- a/Src/Newtonsoft.Json.Roslyn.sln
+++ b/Src/Newtonsoft.Json.Roslyn.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
-VisualStudioVersion = 15.0.26228.4
+VisualStudioVersion = 15.0.26228.12
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B520C700-7D45-4D82-BFB5-218FA68CF5CF}"
ProjectSection(SolutionItems) = preProject
diff --git a/Src/Newtonsoft.Json.Tests/Benchmarks/BenchmarkConstants.cs b/Src/Newtonsoft.Json.Tests/Benchmarks/BenchmarkConstants.cs
index 462cbda2..93e90a2c 100644
--- a/Src/Newtonsoft.Json.Tests/Benchmarks/BenchmarkConstants.cs
+++ b/Src/Newtonsoft.Json.Tests/Benchmarks/BenchmarkConstants.cs
@@ -23,6 +23,8 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
+#if !(NET20 || NET35 || NET40 || PORTABLE || PORTABLE40) || DNXCORE50
+
namespace Newtonsoft.Json.Tests.Benchmarks
{
public static class BenchmarkConstants
@@ -76,4 +78,6 @@ namespace Newtonsoft.Json.Tests.Benchmarks
public const string JsonIsoText =
@"{""strings"":[null,""Markus egger ]><[, (2nd)"",null],""dictionary"":{""Val & asd1"":1,""Val2 & asd1"":3,""Val3 & asd1"":4},""Name"":""Rick"",""Now"":""2012-02-25T19:55:50.6095676+13:00"",""BigNumber"":34123123123.121,""Address1"":{""Street"":""fff Street"",""Phone"":""(503) 814-6335"",""Entered"":""2012-02-24T18:55:50.6095676+13:00""},""Addresses"":[{""Street"":""\u001farray
>(FloatArrayJson);
}
}
-}
\ No newline at end of file
+}
+
+#endif
\ No newline at end of file
diff --git a/Src/Newtonsoft.Json.Tests/Benchmarks/DeserializeComparisonBenchmarks.cs b/Src/Newtonsoft.Json.Tests/Benchmarks/DeserializeComparisonBenchmarks.cs
index 79c41689..57f1df17 100644
--- a/Src/Newtonsoft.Json.Tests/Benchmarks/DeserializeComparisonBenchmarks.cs
+++ b/Src/Newtonsoft.Json.Tests/Benchmarks/DeserializeComparisonBenchmarks.cs
@@ -23,16 +23,20 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
+#if !(NET20 || NET35 || NET40 || PORTABLE || PORTABLE40) || DNXCORE50
+
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
+#if (!DNXCORE50)
using System.Runtime.Serialization.Formatters.Binary;
+using System.Web.Script.Serialization;
+#endif
using System.Runtime.Serialization.Json;
using System.Text;
using System.Threading.Tasks;
-using System.Web.Script.Serialization;
using BenchmarkDotNet.Attributes;
using Newtonsoft.Json.Bson;
using Newtonsoft.Json.Linq;
@@ -67,6 +71,7 @@ namespace Newtonsoft.Json.Tests.Benchmarks
return (T)dataContractSerializer.ReadObject(ms);
}
+#if (!DNXCORE50)
[Benchmark]
public TestClass BinaryFormatter()
{
@@ -91,6 +96,7 @@ namespace Newtonsoft.Json.Tests.Benchmarks
return ser.Deserialize(json);
}
+#endif
[Benchmark]
public TestClass DataContractJsonSerializer()
@@ -116,7 +122,7 @@ namespace Newtonsoft.Json.Tests.Benchmarks
return DeserializeJsonNetManual(BenchmarkConstants.JsonText);
}
- #region DeserializeJsonNetManual
+#region DeserializeJsonNetManual
private TestClass DeserializeJsonNetManual(string json)
{
TestClass c = new TestClass();
@@ -204,7 +210,7 @@ namespace Newtonsoft.Json.Tests.Benchmarks
}
return a;
}
- #endregion
+#endregion
[Benchmark]
public Task JsonNetManualAsync()
@@ -320,4 +326,6 @@ namespace Newtonsoft.Json.Tests.Benchmarks
}
#pragma warning restore 618
}
-}
\ No newline at end of file
+}
+
+#endif
\ No newline at end of file
diff --git a/Src/Newtonsoft.Json.Tests/Benchmarks/JTokenBenchmarks.cs b/Src/Newtonsoft.Json.Tests/Benchmarks/JTokenBenchmarks.cs
index e14f3112..a4f03657 100644
--- a/Src/Newtonsoft.Json.Tests/Benchmarks/JTokenBenchmarks.cs
+++ b/Src/Newtonsoft.Json.Tests/Benchmarks/JTokenBenchmarks.cs
@@ -23,6 +23,8 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
+#if !(NET20 || NET35 || NET40 || PORTABLE || PORTABLE40) || DNXCORE50
+
using System;
using System.Collections.Generic;
using System.IO;
@@ -94,4 +96,6 @@ namespace Newtonsoft.Json.Tests.Benchmarks
return root;
}
}
-}
\ No newline at end of file
+}
+
+#endif
\ No newline at end of file
diff --git a/Src/Newtonsoft.Json.Tests/Benchmarks/JValueConvertBenchmarks.cs b/Src/Newtonsoft.Json.Tests/Benchmarks/JValueConvertBenchmarks.cs
index f4a079c5..ab6398e6 100644
--- a/Src/Newtonsoft.Json.Tests/Benchmarks/JValueConvertBenchmarks.cs
+++ b/Src/Newtonsoft.Json.Tests/Benchmarks/JValueConvertBenchmarks.cs
@@ -23,6 +23,8 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
+#if !(NET20 || NET35 || NET40 || PORTABLE || PORTABLE40) || DNXCORE50
+
using System;
using System.Collections.Generic;
using System.Linq;
@@ -61,4 +63,6 @@ namespace Newtonsoft.Json.Tests.Benchmarks
return (string)StringJValue;
}
}
-}
\ No newline at end of file
+}
+
+#endif
\ No newline at end of file
diff --git a/Src/Newtonsoft.Json.Tests/Benchmarks/JsonTextReaderBenchmarks.cs b/Src/Newtonsoft.Json.Tests/Benchmarks/JsonTextReaderBenchmarks.cs
index ad2c0116..64bb9f15 100644
--- a/Src/Newtonsoft.Json.Tests/Benchmarks/JsonTextReaderBenchmarks.cs
+++ b/Src/Newtonsoft.Json.Tests/Benchmarks/JsonTextReaderBenchmarks.cs
@@ -23,6 +23,8 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
+#if !(NET20 || NET35 || NET40 || PORTABLE || PORTABLE40) || DNXCORE50
+
using System.IO;
using System.Linq;
using System.Xml;
@@ -65,4 +67,6 @@ namespace Newtonsoft.Json.Tests.Benchmarks
}
}
}
-}
\ No newline at end of file
+}
+
+#endif
\ No newline at end of file
diff --git a/Src/Newtonsoft.Json.Tests/Benchmarks/JsonTextWriterBenchmarks.cs b/Src/Newtonsoft.Json.Tests/Benchmarks/JsonTextWriterBenchmarks.cs
index feb8ec49..a1cbac30 100644
--- a/Src/Newtonsoft.Json.Tests/Benchmarks/JsonTextWriterBenchmarks.cs
+++ b/Src/Newtonsoft.Json.Tests/Benchmarks/JsonTextWriterBenchmarks.cs
@@ -23,6 +23,8 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
+#if !(NET20 || NET35 || NET40 || PORTABLE || PORTABLE40) || DNXCORE50
+
using System.IO;
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Running;
@@ -44,4 +46,6 @@ namespace Newtonsoft.Json.Tests.Benchmarks
return sw.ToString();
}
}
-}
\ No newline at end of file
+}
+
+#endif
\ No newline at end of file
diff --git a/Src/Newtonsoft.Json.Tests/Benchmarks/LargeJArrayBenchmarks.cs b/Src/Newtonsoft.Json.Tests/Benchmarks/LargeJArrayBenchmarks.cs
index d21d30c8..2b3a941a 100644
--- a/Src/Newtonsoft.Json.Tests/Benchmarks/LargeJArrayBenchmarks.cs
+++ b/Src/Newtonsoft.Json.Tests/Benchmarks/LargeJArrayBenchmarks.cs
@@ -23,6 +23,8 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
+#if !(NET20 || NET35 || NET40 || PORTABLE || PORTABLE40) || DNXCORE50
+
using System;
using System.Collections.Generic;
using System.IO;
@@ -71,4 +73,6 @@ namespace Newtonsoft.Json.Tests.Benchmarks
_largeJArraySample.RemoveAt(_largeJArraySample.Count - 1);
}
}
-}
\ No newline at end of file
+}
+
+#endif
\ No newline at end of file
diff --git a/Src/Newtonsoft.Json.Tests/Benchmarks/LowLevelBenchmarks.cs b/Src/Newtonsoft.Json.Tests/Benchmarks/LowLevelBenchmarks.cs
index 53ca9060..eac38903 100644
--- a/Src/Newtonsoft.Json.Tests/Benchmarks/LowLevelBenchmarks.cs
+++ b/Src/Newtonsoft.Json.Tests/Benchmarks/LowLevelBenchmarks.cs
@@ -23,6 +23,8 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
+#if !(NET20 || NET35 || NET40 || PORTABLE || PORTABLE40) || DNXCORE50
+
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -87,3 +89,5 @@ If attributes are not mentioned, default values are used in each case.
}
}
}
+
+#endif
\ No newline at end of file
diff --git a/Src/Newtonsoft.Json.Tests/Benchmarks/Runner.cs b/Src/Newtonsoft.Json.Tests/Benchmarks/Runner.cs
index 9fa3b119..62832928 100644
--- a/Src/Newtonsoft.Json.Tests/Benchmarks/Runner.cs
+++ b/Src/Newtonsoft.Json.Tests/Benchmarks/Runner.cs
@@ -23,6 +23,8 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
+#if !(NET20 || NET35 || NET40 || PORTABLE || PORTABLE40) || DNXCORE50
+
using System;
using System.Collections.Generic;
using System.Linq;
@@ -44,11 +46,16 @@ namespace Newtonsoft.Json.Tests.Benchmarks
[TestFixture]
public class Runner : TestFixtureBase
{
- [Test]
+#if DNXCORE50
+ [Test(Skip = "Don't run with other unit tests")]
+#else
[Ignore("Don't run with other unit tests")]
+#endif
public void RunBenchmarks()
{
new BenchmarkSwitcher(typeof(Runner).GetTypeInfo().Assembly).Run(new []{ "*" });
}
}
}
+
+#endif
\ No newline at end of file
diff --git a/Src/Newtonsoft.Json.Tests/Benchmarks/SerializeBenchmarks.cs b/Src/Newtonsoft.Json.Tests/Benchmarks/SerializeBenchmarks.cs
index fe04afa4..4a484fde 100644
--- a/Src/Newtonsoft.Json.Tests/Benchmarks/SerializeBenchmarks.cs
+++ b/Src/Newtonsoft.Json.Tests/Benchmarks/SerializeBenchmarks.cs
@@ -23,6 +23,8 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
+#if !(NET20 || NET35 || NET40 || PORTABLE || PORTABLE40) || DNXCORE50
+
using System;
using System.Collections.Generic;
using System.IO;
@@ -59,4 +61,6 @@ namespace Newtonsoft.Json.Tests.Benchmarks
}
}
}
-}
\ No newline at end of file
+}
+
+#endif
\ No newline at end of file
diff --git a/Src/Newtonsoft.Json.Tests/Benchmarks/SerializeComparisonBenchmarks.cs b/Src/Newtonsoft.Json.Tests/Benchmarks/SerializeComparisonBenchmarks.cs
index 3eaefc91..a7dfa8ad 100644
--- a/Src/Newtonsoft.Json.Tests/Benchmarks/SerializeComparisonBenchmarks.cs
+++ b/Src/Newtonsoft.Json.Tests/Benchmarks/SerializeComparisonBenchmarks.cs
@@ -23,16 +23,20 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
+#if !(NET20 || NET35 || NET40 || PORTABLE || PORTABLE40) || DNXCORE50
+
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
+#if (!DNXCORE50)
using System.Runtime.Serialization.Formatters.Binary;
+using System.Web.Script.Serialization;
+#endif
using System.Runtime.Serialization.Json;
using System.Text;
using System.Threading.Tasks;
-using System.Web.Script.Serialization;
using BenchmarkDotNet.Attributes;
using Newtonsoft.Json.Bson;
using Newtonsoft.Json.Linq;
@@ -91,6 +95,7 @@ namespace Newtonsoft.Json.Tests.Benchmarks
}
}
+#if (!DNXCORE50)
[Benchmark]
public byte[] BinaryFormatter()
{
@@ -118,6 +123,7 @@ namespace Newtonsoft.Json.Tests.Benchmarks
return ser.Serialize(value);
}
+#endif
[Benchmark]
public string DataContractJsonSerializer()
@@ -152,7 +158,7 @@ namespace Newtonsoft.Json.Tests.Benchmarks
return SerializeJsonNetLinq(TestClass);
}
- #region SerializeJsonNetManual
+#region SerializeJsonNetManual
private string SerializeJsonNetLinq(TestClass c)
{
JObject o = new JObject(
@@ -174,7 +180,7 @@ namespace Newtonsoft.Json.Tests.Benchmarks
return o.ToString(Formatting.None);
}
- #endregion
+#endregion
[Benchmark]
public string JsonNetManual()
@@ -182,7 +188,7 @@ namespace Newtonsoft.Json.Tests.Benchmarks
return SerializeJsonNetManual(TestClass);
}
- #region SerializeJsonNetManual
+#region SerializeJsonNetManual
private string SerializeJsonNetManual(TestClass c)
{
StringWriter sw = new StringWriter();
@@ -237,7 +243,7 @@ namespace Newtonsoft.Json.Tests.Benchmarks
writer.Flush();
return sw.ToString();
}
- #endregion
+#endregion
[Benchmark]
public Task JsonNetManualAsync()
@@ -328,4 +334,6 @@ namespace Newtonsoft.Json.Tests.Benchmarks
}
#pragma warning restore 618
}
-}
\ No newline at end of file
+}
+
+#endif
\ No newline at end of file
diff --git a/Src/Newtonsoft.Json.Tests/Benchmarks/XmlNodeConverterBenchmarks.cs b/Src/Newtonsoft.Json.Tests/Benchmarks/XmlNodeConverterBenchmarks.cs
index 999f3d9d..e41a11cb 100644
--- a/Src/Newtonsoft.Json.Tests/Benchmarks/XmlNodeConverterBenchmarks.cs
+++ b/Src/Newtonsoft.Json.Tests/Benchmarks/XmlNodeConverterBenchmarks.cs
@@ -23,6 +23,8 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
+#if !(NET20 || NET35 || NET40 || PORTABLE || PORTABLE40) || DNXCORE50
+
using System;
using System.Collections.Generic;
using System.IO;
@@ -62,4 +64,6 @@ namespace Newtonsoft.Json.Tests.Benchmarks
JsonConvert.SerializeXNode(doc);
}
}
-}
\ No newline at end of file
+}
+
+#endif
\ No newline at end of file
diff --git a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net20.project.json b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net20.project.json
index 4014ab61..fe09b451 100644
--- a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net20.project.json
+++ b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net20.project.json
@@ -1,6 +1,6 @@
{
"dependencies": {
- "NUnit": "2.6.2"
+ "NUnit": "3.6.0"
},
"frameworks": {
"net20": {}
diff --git a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net35.project.json b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net35.project.json
index e1ed027e..def8ac0c 100644
--- a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net35.project.json
+++ b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net35.project.json
@@ -1,6 +1,6 @@
{
"dependencies": {
- "NUnit": "2.6.2"
+ "NUnit": "3.6.0"
},
"frameworks": {
"net35": {}
diff --git a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net40.project.json b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net40.project.json
index 842b95d1..db2b18ba 100644
--- a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net40.project.json
+++ b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net40.project.json
@@ -1,7 +1,7 @@
{
"dependencies": {
- "NUnit": "2.6.2",
- "FSharp.Core": "4.0.0.1",
+ "NUnit": "3.6.0",
+ "FSharp.Core": "4.1.2",
"System.ValueTuple": "4.3.0"
},
"frameworks": {
diff --git a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Portable.project.json b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Portable.project.json
index b12fe9d2..49b5e25f 100644
--- a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Portable.project.json
+++ b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Portable.project.json
@@ -1,8 +1,8 @@
{
"dependencies": {
- "FSharp.Core": "4.0.0.1",
- "NUnit": "2.6.2",
- "System.Collections.Immutable": "1.1.37",
+ "FSharp.Core": "4.1.2",
+ "NUnit": "3.6.0",
+ "System.Collections.Immutable": "1.3.1",
"System.ValueTuple": "4.3.0"
},
"frameworks": {
diff --git a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Portable40.project.json b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Portable40.project.json
index c46b1171..c6d009fc 100644
--- a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Portable40.project.json
+++ b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Portable40.project.json
@@ -1,7 +1,7 @@
{
"dependencies": {
- "FSharp.Core": "4.0.0.1",
- "NUnit": "2.6.2"
+ "FSharp.Core": "4.1.2",
+ "NUnit": "3.6.0"
},
"frameworks": {
"net40": {}
diff --git a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Roslyn.csproj b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Roslyn.csproj
index 687afd41..36b35298 100644
--- a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Roslyn.csproj
+++ b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Roslyn.csproj
@@ -6,8 +6,9 @@
- net45;net40;net35;net20;netcoreapp1.0
- netcoreapp1.0
+ net45;net40;net35;net20;netcoreapp1.1
+ netcoreapp1.1
+
10.0.1
James Newton-King
en-US
@@ -15,11 +16,10 @@
Newtonsoft.Json.Tests
false
- Full
+ Full
-
PreserveNewest
@@ -43,9 +43,9 @@
-
+
-
+
@@ -63,7 +63,7 @@
-
+
@@ -97,8 +97,9 @@
NET20;$(AdditionalConstants)
-
-
+
+
+
@@ -114,7 +115,7 @@
-
- NETSTANDARD1_1;DNXCORE50;PORTABLE;$(AdditionalConstants)
+
+ NETSTANDARD1_3;DNXCORE50;PORTABLE;$(AdditionalConstants)
\ No newline at end of file
diff --git a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.project.json b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.project.json
index ad331823..76f012a7 100644
--- a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.project.json
+++ b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.project.json
@@ -1,11 +1,11 @@
{
"dependencies": {
- "Autofac": "4.0.0-rc2-240",
+ "Autofac": "4.4.0",
"BenchmarkDotNet": "0.10.2",
- "FSharp.Core": "4.0.0.1",
- "NUnit": "2.6.2",
+ "FSharp.Core": "4.1.2",
+ "NUnit": "3.6.0",
"System.Buffers": "4.0.0",
- "System.Collections.Immutable": "1.1.37",
+ "System.Collections.Immutable": "1.3.1",
"System.ValueTuple": "4.3.0"
},
"frameworks": {
diff --git a/Src/Newtonsoft.Json.Tests/TestObjects/Address.cs b/Src/Newtonsoft.Json.Tests/TestObjects/Address.cs
index 8e8a6927..18d7bcd5 100644
--- a/Src/Newtonsoft.Json.Tests/TestObjects/Address.cs
+++ b/Src/Newtonsoft.Json.Tests/TestObjects/Address.cs
@@ -29,7 +29,7 @@ using System.Runtime.Serialization;
namespace Newtonsoft.Json.Tests.TestObjects
{
-#if !(NET20 || DNXCORE50)
+#if !(NET20)
[Serializable]
[DataContract]
public class Address
diff --git a/Src/Newtonsoft.Json.Tests/TestObjects/TestClass.cs b/Src/Newtonsoft.Json.Tests/TestObjects/TestClass.cs
index 3c0e45a3..deb9e7f5 100644
--- a/Src/Newtonsoft.Json.Tests/TestObjects/TestClass.cs
+++ b/Src/Newtonsoft.Json.Tests/TestObjects/TestClass.cs
@@ -29,7 +29,7 @@ using System.Runtime.Serialization;
namespace Newtonsoft.Json.Tests.TestObjects
{
-#if !(NET20 || DNXCORE50)
+#if !(NET20)
[Serializable]
[DataContract]
public class TestClass