-Updated NuGet packages
-Changed .NET Core test project to 1.1
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<address"",""Phone"":""(503) 814-6335"",""Entered"":""2012-02-24T18:55:50.6095676+13:00""},{""Street"":""array 2 address"",""Phone"":""(503) 814-6335"",""Entered"":""2012-02-24T18:55:50.6095676+13:00""}]}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -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;
|
||||
@@ -77,4 +79,6 @@ namespace Newtonsoft.Json.Tests.Benchmarks
|
||||
return JsonConvert.DeserializeObject<IList<decimal>>(FloatArrayJson);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -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<T>(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<TestClass> JsonNetManualAsync()
|
||||
@@ -320,4 +326,6 @@ namespace Newtonsoft.Json.Tests.Benchmarks
|
||||
}
|
||||
#pragma warning restore 618
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -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<string> JsonNetManualAsync()
|
||||
@@ -328,4 +334,6 @@ namespace Newtonsoft.Json.Tests.Benchmarks
|
||||
}
|
||||
#pragma warning restore 618
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"NUnit": "2.6.2"
|
||||
"NUnit": "3.6.0"
|
||||
},
|
||||
"frameworks": {
|
||||
"net20": {}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"NUnit": "2.6.2"
|
||||
"NUnit": "3.6.0"
|
||||
},
|
||||
"frameworks": {
|
||||
"net35": {}
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -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": {}
|
||||
|
||||
@@ -6,8 +6,9 @@
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks Condition="'$(DotnetOnly)'==''">net45;net40;net35;net20;netcoreapp1.0</TargetFrameworks>
|
||||
<TargetFrameworks Condition="'$(DotnetOnly)'=='true'">netcoreapp1.0</TargetFrameworks>
|
||||
<TargetFrameworks Condition="'$(DotnetOnly)'==''">net45;net40;net35;net20;netcoreapp1.1</TargetFrameworks>
|
||||
<TargetFrameworks Condition="'$(DotnetOnly)'=='true'">netcoreapp1.1</TargetFrameworks>
|
||||
<!--<TargetFrameworks>netcoreapp1.1</TargetFrameworks>-->
|
||||
<VersionPrefix>10.0.1</VersionPrefix>
|
||||
<Authors>James Newton-King</Authors>
|
||||
<NeutralLanguage>en-US</NeutralLanguage>
|
||||
@@ -15,11 +16,10 @@
|
||||
<AssemblyName>Newtonsoft.Json.Tests</AssemblyName>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<!-- Workaround for https://github.com/nunit/nunit3-vs-adapter/issues/296 -->
|
||||
<DebugType Condition="'$(TargetFramework)' != '' AND '$(TargetFramework)' != 'netcoreapp1.0'">Full</DebugType>
|
||||
<DebugType Condition="'$(TargetFramework)' != '' AND '$(TargetFramework)' != 'netcoreapp1.1'">Full</DebugType>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Remove="**\*.orig" />
|
||||
<Compile Condition="'$(TargetFramework)' != '' AND '$(TargetFramework)' != 'net45'" Remove="Benchmarks\**" />
|
||||
<None Include="large.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
@@ -43,9 +43,9 @@
|
||||
<ItemGroup Condition="'$(TargetFramework)'=='net45'">
|
||||
<PackageReference Include="NUnit" Version="3.6.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="3.7.0" />
|
||||
<PackageReference Include="Autofac" Version="4.0.0-rc2-240" />
|
||||
<PackageReference Include="Autofac" Version="4.4.0" />
|
||||
<PackageReference Include="BenchmarkDotNet" Version="0.10.2" />
|
||||
<PackageReference Include="FSharp.Core" Version="4.0.1.7-alpha" />
|
||||
<PackageReference Include="FSharp.Core" Version="4.1.2" />
|
||||
<PackageReference Include="System.Buffers" Version="4.0.0" />
|
||||
<PackageReference Include="System.Collections.Immutable" Version="1.3.1" />
|
||||
<PackageReference Include="System.ValueTuple" Version="4.3.0" />
|
||||
@@ -63,7 +63,7 @@
|
||||
<ItemGroup Condition="'$(TargetFramework)'=='net40'">
|
||||
<PackageReference Include="NUnit" Version="3.6.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="3.7.0" />
|
||||
<PackageReference Include="FSharp.Core" Version="4.0.1.7-alpha" />
|
||||
<PackageReference Include="FSharp.Core" Version="4.1.2" />
|
||||
<PackageReference Include="System.ValueTuple" Version="4.3.0" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Web" />
|
||||
@@ -97,8 +97,9 @@
|
||||
<PropertyGroup Condition="'$(TargetFramework)'=='net20'">
|
||||
<DefineConstants>NET20;$(AdditionalConstants)</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp1.0'">
|
||||
<PackageReference Include="FSharp.Core" Version="4.1.0" />
|
||||
<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp1.1'">
|
||||
<PackageReference Include="BenchmarkDotNet" Version="0.10.2" />
|
||||
<PackageReference Include="FSharp.Core" Version="4.1.2" />
|
||||
<PackageReference Include="System.ObjectModel" Version="4.3.0" />
|
||||
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.3.0" />
|
||||
<PackageReference Include="System.Runtime.Serialization.Xml" Version="4.3.0" />
|
||||
@@ -114,7 +115,7 @@
|
||||
<!-- Tracking for removal https://github.com/Microsoft/vstest/issues/472 -->
|
||||
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Condition="'$(TargetFramework)'=='netcoreapp1.0'">
|
||||
<DefineConstants>NETSTANDARD1_1;DNXCORE50;PORTABLE;$(AdditionalConstants)</DefineConstants>
|
||||
<PropertyGroup Condition="'$(TargetFramework)'=='netcoreapp1.1'">
|
||||
<DefineConstants>NETSTANDARD1_3;DNXCORE50;PORTABLE;$(AdditionalConstants)</DefineConstants>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -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": {
|
||||
|
||||
@@ -29,7 +29,7 @@ using System.Runtime.Serialization;
|
||||
|
||||
namespace Newtonsoft.Json.Tests.TestObjects
|
||||
{
|
||||
#if !(NET20 || DNXCORE50)
|
||||
#if !(NET20)
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class Address
|
||||
|
||||
@@ -29,7 +29,7 @@ using System.Runtime.Serialization;
|
||||
|
||||
namespace Newtonsoft.Json.Tests.TestObjects
|
||||
{
|
||||
#if !(NET20 || DNXCORE50)
|
||||
#if !(NET20)
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class TestClass
|
||||
|
||||
Reference in New Issue
Block a user