Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix bench

  • Loading branch information...
commit 185259b85563befcf9aea607f2eb09552d637450 1 parent a5e8167
@etishor authored
View
12 Serialization.Bench/Program.cs
@@ -6,6 +6,8 @@
using SerializersTests;
using SerializersTests.Messages;
using System.Text;
+using System.Reflection;
+using Newtonsoft.Json.Serialization;
namespace Serialization.Bench
{
@@ -13,6 +15,16 @@ class Program
{
static void Main(string[] args)
{
+ AppDomain.CurrentDomain.AssemblyResolve += (s, o) =>
+ {
+ var name = new AssemblyName(o.Name);
+ if (name.Name.Contains("Newtonsoft.Json"))
+ {
+ return typeof(JsonContract).Assembly;
+ }
+ return null;
+ };
+
SerializationBenchmark.Run();
Console.WriteLine("Done");
View
12 Serialization.Bench/Serialization.Bench.csproj
@@ -36,25 +36,18 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Newtonsoft.Json">
- <HintPath>..\lib\Newtonsoft.Json\Newtonsoft.Json.dll</HintPath>
+ <Reference Include="Newtonsoft.Json, Version=4.0.4.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
+ <HintPath>..\packages\Newtonsoft.Json.4.0.4\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="NServiceBus, Version=3.0.0.0, Culture=neutral, PublicKeyToken=9fc386479f8a226c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\lib\NServiceBus\NServiceBus.dll</HintPath>
</Reference>
- <Reference Include="protobuf-net">
- <HintPath>..\lib\protobuf-net\protobuf-net.dll</HintPath>
- </Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Web" />
<Reference Include="System.Web.DataVisualization" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Benchmark.cs" />
@@ -74,6 +67,7 @@
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
+ <None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
View
2  Serialization.Bench/app.config
@@ -7,7 +7,7 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
+ <bindingRedirect oldVersion="0.0.0.0-4.0.4.0" newVersion="4.0.4.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
View
1  packages/repositories.config
@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<repositories>
<repository path="..\SerializersTests\packages.config" />
+ <repository path="..\Serialization.Bench\packages.config" />
</repositories>
Please sign in to comment.
Something went wrong with that request. Please try again.