-Fixed build

This commit is contained in:
James Newton-King
2014-04-26 23:06:30 +12:00
parent b40d705644
commit 11c2ad5c1c
15 changed files with 112 additions and 18 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ task Build -depends Clean {
Write-Host -ForegroundColor Green "Building " $name
Write-Host -ForegroundColor Green "Signed " $sign
Write-Host
exec { msbuild "/t:Clean;Rebuild" /p:Configuration=Release "/p:Platform=Any CPU" /p:OutputPath=bin\Release\$finalDir\ /p:AssemblyOriginatorKeyFile=$signKeyPath "/p:SignAssembly=$sign" "/p:TreatWarningsAsErrors=$treatWarningsAsErrors" (GetConstants $build.Constants $sign) ".\Src\$name.sln" | Out-Default } "Error building $name"
exec { msbuild "/t:Clean;Rebuild" /p:Configuration=Release "/p:Platform=Any CPU" /p:OutputPath=bin\Release\$finalDir\ /p:AssemblyOriginatorKeyFile=$signKeyPath "/p:SignAssembly=$sign" "/p:TreatWarningsAsErrors=$treatWarningsAsErrors" "/p:VisualStudioVersion=12.0" (GetConstants $build.Constants $sign) ".\Src\$name.sln" | Out-Default } "Error building $name"
}
}
+4 -2
View File
@@ -1,6 +1,8 @@
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30324.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lib", "Lib", "{620042D9-2753-48F5-BEDE-3905248781D2}"
ProjectSection(SolutionItems) = preProject
Lib\NUnit\DotNet\nunit.framework.dll = Lib\NUnit\DotNet\nunit.framework.dll
@@ -25,7 +25,6 @@
#if !NETFX_CORE
using NUnit.Framework;
#else
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
@@ -290,7 +290,7 @@ namespace Newtonsoft.Json.Tests.Linq.JsonPath
new JProperty("Blah", 1));
JValue v = (JValue)o.SelectToken("Blah", true);
Assert.AreEqual(1L, v.Value);
Assert.AreEqual(1, v.Value);
}
[Test]
@@ -76,9 +76,8 @@
<HintPath>..\packages\NUnit.2.6.2\lib\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Collections.Immutable, Version=1.0.23.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Microsoft.Bcl.Immutable.1.0.27\lib\portable-net45+win8+wp8\System.Collections.Immutable.dll</HintPath>
<Reference Include="System.Collections.Immutable">
<HintPath>..\packages\Microsoft.Bcl.Immutable.1.1.20-beta\lib\portable-net45+win8\System.Collections.Immutable.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.DataAnnotations">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
@@ -166,8 +166,11 @@
<Compile Include="Serialization\DefaultValueHandlingTests.cs" />
<Compile Include="Serialization\DynamicTests.cs" />
<Compile Include="Serialization\EntitiesSerializationTests.cs" />
<Compile Include="Serialization\ExtensionDataTests.cs" />
<Compile Include="Serialization\FSharpTests.cs" />
<Compile Include="Serialization\ImmutableCollectionsTests.cs" />
<Compile Include="Serialization\JsonPropertyCollectionTests.cs" />
<Compile Include="Serialization\JsonSerializerCollectionsTests.cs" />
<Compile Include="Serialization\JsonSerializerTest.cs" />
<Compile Include="Serialization\MissingMemberHandlingTests.cs" />
<Compile Include="Serialization\NullValueHandlingTests.cs" />
@@ -176,16 +179,22 @@
<Compile Include="Serialization\ReferenceLoopHandlingTests.cs" />
<Compile Include="Serialization\SerializationErrorHandlingTests.cs" />
<Compile Include="Serialization\SerializationEventAttributeTests.cs" />
<Compile Include="Serialization\ShouldSerializeTests.cs" />
<Compile Include="Serialization\SpecialPropertyHandlingTests.cs" />
<Compile Include="Serialization\TraceWriterTests.cs" />
<Compile Include="Serialization\TypeNameHandlingTests.cs" />
<Compile Include="Serialization\WebApiIntegrationTests.cs" />
<Compile Include="TestFixtureBase.cs" />
<Compile Include="TestObjects\Aa.cs" />
<Compile Include="TestObjects\AbstractGenericBase.cs" />
<Compile Include="TestObjects\AnswerFilterModel.cs" />
<Compile Include="TestObjects\Antworten.cs" />
<Compile Include="TestObjects\ArgumentConverterPrecedenceClassConverter.cs" />
<Compile Include="TestObjects\Article.cs" />
<Compile Include="TestObjects\ArticleCollection.cs" />
<Compile Include="TestObjects\BadJsonPropertyClass.cs" />
<Compile Include="TestObjects\Bar.cs" />
<Compile Include="TestObjects\Bb.cs" />
<Compile Include="TestObjects\Car.cs" />
<Compile Include="TestObjects\CircularReferenceClass.cs" />
<Compile Include="TestObjects\CircularReferenceWithIdClass.cs" />
@@ -193,6 +202,7 @@
<Compile Include="TestObjects\ClassConverterPrecedenceClassConverter.cs" />
<Compile Include="TestObjects\ClassWithArray.cs" />
<Compile Include="TestObjects\ClassWithGuid.cs" />
<Compile Include="TestObjects\Component.cs" />
<Compile Include="TestObjects\Computer.cs" />
<Compile Include="TestObjects\ConstructorCaseSensitivityClass.cs" />
<Compile Include="TestObjects\ConstructorReadonlyFields.cs" />
@@ -204,25 +214,35 @@
<Compile Include="TestObjects\ConverterPrecedenceClass.cs" />
<Compile Include="TestObjects\ConverterPrecedenceClassConverter.cs" />
<Compile Include="TestObjects\CustomerDataSet.cs" />
<Compile Include="TestObjects\DataContractSerializationAttributesClass.cs" />
<Compile Include="TestObjects\DateTimeErrorObjectCollection.cs" />
<Compile Include="TestObjects\DateTimeTestClass.cs" />
<Compile Include="TestObjects\DateTimeWrapper.cs" />
<Compile Include="TestObjects\DecimalTestClass.cs" />
<Compile Include="TestObjects\DefaultValueAttributeTestClass.cs" />
<Compile Include="TestObjects\DictionaryInterfaceClass.cs" />
<Compile Include="TestObjects\DirectoryAccount.cs" />
<Compile Include="TestObjects\DoubleClass.cs" />
<Compile Include="TestObjects\EmployeeReference.cs" />
<Compile Include="TestObjects\Event.cs" />
<Compile Include="TestObjects\Event1.cs" />
<Compile Include="TestObjects\Foo.cs" />
<Compile Include="TestObjects\GameObject.cs" />
<Compile Include="TestObjects\GenericImpl.cs" />
<Compile Include="TestObjects\GenericListAndDictionaryInterfaceProperties.cs" />
<Compile Include="TestObjects\GetOnlyPropertyClass.cs" />
<Compile Include="TestObjects\GoogleMapGeocoderStructure.cs" />
<Compile Include="TestObjects\HolderClass.cs" />
<Compile Include="TestObjects\IdReferenceResolver.cs" />
<Compile Include="TestObjects\IMyInterface.cs" />
<Compile Include="TestObjects\IncompatibleJsonAttributeClass.cs" />
<Compile Include="TestObjects\InterfacePropertyTestClass.cs" />
<Compile Include="TestObjects\IntToFloatConverter.cs" />
<Compile Include="TestObjects\Invoice.cs" />
<Compile Include="TestObjects\IPrivateImplementationA.cs" />
<Compile Include="TestObjects\IPrivateImplementationB.cs" />
<Compile Include="TestObjects\IPrivateOverriddenImplementation.cs" />
<Compile Include="TestObjects\Item.cs" />
<Compile Include="TestObjects\JaggedArray.cs" />
<Compile Include="TestObjects\JsonIgnoreAttributeOnClassTestClass.cs" />
<Compile Include="TestObjects\JsonIgnoreAttributeTestClass.cs" />
@@ -236,17 +256,25 @@
<Compile Include="TestObjects\MemberConverterClass.cs" />
<Compile Include="TestObjects\MemberConverterPrecedenceClassConverter.cs" />
<Compile Include="TestObjects\MethodExecutorObject.cs" />
<Compile Include="TestObjects\MetroPropertyNameResolver.cs" />
<Compile Include="TestObjects\MetroStringConverter.cs" />
<Compile Include="TestObjects\Movie.cs" />
<Compile Include="TestObjects\MyClass.cs" />
<Compile Include="TestObjects\Name.cs" />
<Compile Include="TestObjects\NonRequest.cs" />
<Compile Include="TestObjects\NullableDateTimeTestClass.cs" />
<Compile Include="TestObjects\NullableGuid.cs" />
<Compile Include="TestObjects\ObjectArrayPropertyTest.cs" />
<Compile Include="TestObjects\ParticipantEntity.cs" />
<Compile Include="TestObjects\Person.cs" />
<Compile Include="TestObjects\PersonError.cs" />
<Compile Include="TestObjects\PersonPropertyClass.cs" />
<Compile Include="TestObjects\PersonRaw.cs" />
<Compile Include="TestObjects\PersonReference.cs" />
<Compile Include="TestObjects\PersonSerializable.cs" />
<Compile Include="TestObjects\PersonWithPrivateConstructor.cs" />
<Compile Include="TestObjects\PhoneNumber.cs" />
<Compile Include="TestObjects\PocoDataContractSerializationAttributesClass.cs" />
<Compile Include="TestObjects\PrivateConstructorTestClass.cs" />
<Compile Include="TestObjects\PrivateConstructorWithPublicParametizedConstructorTestClass.cs" />
<Compile Include="TestObjects\PrivateImplementationAClass.cs" />
@@ -256,14 +284,18 @@
<Compile Include="TestObjects\ProductCollection.cs" />
<Compile Include="TestObjects\ProductShort.cs" />
<Compile Include="TestObjects\PropertyCase.cs" />
<Compile Include="TestObjects\PropertyItemConverter.cs" />
<Compile Include="TestObjects\PublicParametizedConstructorRequiringConverterTestClass.cs" />
<Compile Include="TestObjects\PublicParametizedConstructorTestClass.cs" />
<Compile Include="TestObjects\PublicParametizedConstructorWithNonPropertyParameterTestClass.cs" />
<Compile Include="TestObjects\PublicParametizedConstructorWithPropertyNameConflict.cs" />
<Compile Include="TestObjects\Ratio.cs" />
<Compile Include="TestObjects\RequestOnly.cs" />
<Compile Include="TestObjects\RequiredMembersClass.cs" />
<Compile Include="TestObjects\RequiredObject.cs" />
<Compile Include="TestObjects\RoleTransfer.cs" />
<Compile Include="TestObjects\SearchResult.cs" />
<Compile Include="TestObjects\SelectListItem.cs" />
<Compile Include="TestObjects\SerializationEventTestDictionary.cs" />
<Compile Include="TestObjects\SerializationEventTestList.cs" />
<Compile Include="TestObjects\SerializationEventTestObject.cs" />
@@ -276,12 +308,22 @@
<Compile Include="TestObjects\StructTest.cs" />
<Compile Include="TestObjects\SubKlass.cs" />
<Compile Include="TestObjects\SuperKlass.cs" />
<Compile Include="TestObjects\TestComponent.cs" />
<Compile Include="TestObjects\TestComponentSimple.cs" />
<Compile Include="TestObjects\TestObject.cs" />
<Compile Include="TestObjects\TypeClass.cs" />
<Compile Include="TestObjects\TypedSubHashtable.cs" />
<Compile Include="TestObjects\UriGuidTimeSpanTestClass.cs" />
<Compile Include="TestObjects\UserNullable.cs" />
<Compile Include="TestObjects\VersionKeyedCollection.cs" />
<Compile Include="TestObjects\WagePerson.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="TestObjects\Widget.cs" />
<Compile Include="TestObjects\Widget1.cs" />
<Compile Include="TestObjects\WidgetId.cs" />
<Compile Include="TestObjects\WidgetId1.cs" />
<Compile Include="TestObjects\WidgetIdJsonConverter.cs" />
<Compile Include="TestObjects\WithEnums.cs" />
<Compile Include="Utilities\DateTimeUtilsTests.cs" />
<Compile Include="Utilities\DynamicReflectionDelegateFactoryTests.cs" />
<Compile Include="Utilities\ExpressionReflectionDelegateFactoryTests.cs" />
@@ -318,7 +360,7 @@
</ItemGroup>
<ItemGroup>
<Reference Include="System.Collections.Immutable">
<HintPath>..\packages\Microsoft.Bcl.Immutable.1.0.27\lib\portable-net45+win8+wp8\System.Collections.Immutable.dll</HintPath>
<HintPath>..\packages\Microsoft.Bcl.Immutable.1.1.20-beta\lib\portable-net45+win8\System.Collections.Immutable.dll</HintPath>
</Reference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '12.0' ">
@@ -28,7 +28,13 @@ using System.Collections.Generic;
using System.Text;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Tests.TestObjects;
#if !NETFX_CORE
using NUnit.Framework;
#else
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#endif
namespace Newtonsoft.Json.Tests.Serialization
{
@@ -40,7 +40,13 @@ using System.Linq;
using System.Text;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Tests.TestObjects;
#if !NETFX_CORE
using NUnit.Framework;
#else
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#endif
namespace Newtonsoft.Json.Tests.Serialization
{
@@ -228,7 +228,7 @@ namespace Newtonsoft.Json.Tests.Serialization
var json = JsonConvert.SerializeObject(input);
var deserialized = JsonConvert.DeserializeObject<ResponseWithNewGenericProperty<List<int>>>(json);
Assert.AreEqual(input.Data, deserialized.Data);
CollectionAssert.AreEqual(input.Data, deserialized.Data);
Assert.AreEqual(input.Message, deserialized.Message);
Assert.AreEqual(input.Result, deserialized.Result);
}
@@ -651,6 +651,7 @@ namespace Newtonsoft.Json.Tests.Serialization
Assert.AreEqual("value", deserialized.foo.bar);
}
#if !NETFX_CORE
[Test]
public void ConversionOperator()
{
@@ -676,6 +677,7 @@ namespace Newtonsoft.Json.Tests.Serialization
Console.WriteLine("Time elapsed: " + stopWatch.ElapsedMilliseconds);
}
#endif
internal class DictionaryKeyCast
{
@@ -29,7 +29,13 @@ using System.Globalization;
using System.IO;
using System.Text;
using Newtonsoft.Json.Serialization;
#if !NETFX_CORE
using NUnit.Framework;
#else
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#endif
namespace Newtonsoft.Json.Tests.Serialization
{
@@ -93,9 +99,9 @@ namespace Newtonsoft.Json.Tests.Serialization
var deserializedSetFoo = JsonConvert.DeserializeObject<Foo1>(setFooJson);
Assert.AreEqual(setFoo.name, deserializedSetFoo.name);
Assert.NotNull(deserializedSetFoo.myBar);
Assert.IsNotNull(deserializedSetFoo.myBar);
Assert.AreEqual(setFoo.myBar.name, deserializedSetFoo.myBar.name);
Assert.NotNull(deserializedSetFoo.myBar.myBaz);
Assert.IsNotNull(deserializedSetFoo.myBar.myBaz);
Assert.AreEqual(setFoo.myBar.myBaz.Length, deserializedSetFoo.myBar.myBaz.Length);
Assert.AreEqual(setFoo.myBar.myBaz[0].name, deserializedSetFoo.myBar.myBaz[0].name);
Assert.IsNotNull(deserializedSetFoo.myBar.myBaz[0].myFrob[0]);
@@ -125,7 +131,7 @@ namespace Newtonsoft.Json.Tests.Serialization
jsonSerializer.Serialize(jsonWriter, f, typeof(Foo1));
}
Console.Out.WriteLine("Trace output:\n{0}", traceWriter.ToString());
Console.WriteLine("Trace output:\n{0}", traceWriter.ToString());
return sw.ToString();
}
@@ -1,11 +1,42 @@
using System;
#region License
// Copyright (c) 2007 James Newton-King
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
using System;
using System.Collections.Generic;
using System.Runtime.Serialization.Formatters;
using System.Text;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Tests.TestObjects;
using Newtonsoft.Json.Utilities;
#if !NETFX_CORE
using NUnit.Framework;
#else
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#endif
namespace Newtonsoft.Json.Tests.Serialization
{
@@ -1765,7 +1765,7 @@ namespace Newtonsoft.Json.Tests.Serialization
});
ReportItemKeys item = (ReportItemKeys)g.ItemIdentifier;
Assert.AreEqual(1, item.WantedUnitID);
Assert.AreEqual(1UL, item.WantedUnitID);
}
#endif
}
@@ -9,10 +9,10 @@
<RootNamespace>Newtonsoft.Json</RootNamespace>
<AssemblyName>Newtonsoft.Json</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Profile225</TargetFrameworkProfile>
<TargetFrameworkProfile>Profile259</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<MinimumVisualStudioVersion>10.0</MinimumVisualStudioVersion>
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -263,6 +263,7 @@
<Compile Include="Serialization\MemoryTraceWriter.cs" />
<Compile Include="Serialization\TraceJsonReader.cs" />
<Compile Include="Serialization\TraceJsonWriter.cs" />
<Compile Include="SpecialPropertyHandling.cs" />
<Compile Include="StringEscapeHandling.cs" />
<Compile Include="TraceLevel.cs" />
<Compile Include="TypeNameHandling.cs" />
@@ -411,7 +411,7 @@ namespace Newtonsoft.Json.Serialization
JsonObjectContract objectContract = (JsonObjectContract)contract;
object targetObject;
// check that if type name handling is being used that the existing value is compatible with the specified type
if (existingValue != null && (resolvedObjectType == objectType || resolvedObjectType.IsInstanceOfType(existingValue)))
if (existingValue != null && (resolvedObjectType == objectType || resolvedObjectType.IsAssignableFrom(existingValue.GetType())))
targetObject = existingValue;
else
targetObject = CreateNewObject(reader, objectContract, member, containerMember, id, out createdFromNonDefaultConstructor);