-Upgraded Windows Phone project to WP8

This commit is contained in:
James Newton-King
2013-03-11 20:14:24 +13:00
parent 0e753888d0
commit 4d291cfc3d
26 changed files with 89 additions and 97 deletions
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(NET35 || NET20 || WINDOWS_PHONE)
#if !(NET35 || NET20)
using System;
using System.Collections.Generic;
@@ -14,7 +14,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Newtonsoft.Json.Tests</RootNamespace>
<AssemblyName>Newtonsoft.Json.Tests</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
<SilverlightApplication>false</SilverlightApplication>
<FileUpgradeFlags>
</FileUpgradeFlags>
@@ -52,6 +52,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -63,10 +64,12 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<Reference Include="Microsoft.CSharp, Version=5.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Microsoft SDKs\Silverlight\v5.0\Libraries\Client\Microsoft.CSharp.dll</HintPath>
</Reference>
<Reference Include="nunit.framework, Version=2.4.7.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@@ -11,13 +11,16 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Newtonsoft.Json.Tests</RootNamespace>
<AssemblyName>Newtonsoft.Json.Tests</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
<TargetFrameworkProfile>WindowsPhone</TargetFrameworkProfile>
<TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
<SilverlightVersion>
</SilverlightVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>
<SilverlightApplication>false</SilverlightApplication>
<ValidateXaml>true</ValidateXaml>
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -29,6 +32,7 @@
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -39,29 +43,12 @@
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.framework">
<HintPath>..\Lib\NUnit\Silverlight\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.Serialization">
<Private>True</Private>
</Reference>
<Reference Include="System.Windows">
<Private>True</Private>
</Reference>
<Reference Include="system">
<Private>True</Private>
</Reference>
<Reference Include="System.Core">
<Private>True</Private>
</Reference>
<Reference Include="System.Xml">
<Private>True</Private>
</Reference>
<Reference Include="System.Net">
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Bson\BsonReaderTests.cs" />
@@ -79,6 +66,7 @@
<Compile Include="JsonArrayAttributeTests.cs" />
<Compile Include="Linq\ComponentModel\BindingTests.cs" />
<Compile Include="Linq\ComponentModel\JPropertyDescriptorTests.cs" />
<Compile Include="Linq\DynamicTests.cs" />
<Compile Include="Linq\JPathTests.cs" />
<Compile Include="Linq\JRawTests.cs" />
<Compile Include="Linq\JTokenReaderTest.cs" />
@@ -235,8 +223,8 @@
<Name>Newtonsoft.Json.WindowsPhone</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.$(TargetFrameworkProfile).Overrides.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\$(TargetFrameworkVersion)\Microsoft.Silverlight.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
<ProjectExtensions />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
@@ -177,7 +177,7 @@ namespace Newtonsoft.Json.Tests.Serialization
}", json);
}
#if !(NET35 || NET20 || WINDOWS_PHONE)
#if !(NET35 || NET20)
[Test]
public void DynamicCamelCasePropertyNames()
{
@@ -23,7 +23,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
#endregion
#if !(NET35 || NET20 || WINDOWS_PHONE)
#if !(NET35 || NET20)
using System;
using System.Collections;
using System.Collections.Generic;
@@ -24,7 +24,7 @@
#endregion
using System;
#if !(NET35 || NET20 || SILVERLIGHT || WINDOWS_PHONE)
#if !(NET35 || NET20 || SILVERLIGHT)
using System.Collections.Concurrent;
#endif
using System.Collections.Generic;
@@ -53,7 +53,7 @@ using System.Collections.ObjectModel;
using Newtonsoft.Json.Bson;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Converters;
#if !NET20 && !WINDOWS_PHONE
#if !NET20
using System.Runtime.Serialization.Json;
#endif
using Newtonsoft.Json.Serialization;
@@ -69,7 +69,7 @@ using System.Text.RegularExpressions;
using System.Collections.Specialized;
using System.Linq.Expressions;
#endif
#if !(NET35 || NET20 || WINDOWS_PHONE)
#if !(NET35 || NET20)
using System.Dynamic;
using System.ComponentModel;
#endif
@@ -173,7 +173,7 @@ namespace Newtonsoft.Json.Tests.Serialization
string jsonText = JsonConvert.SerializeObject(testDictionary);
#if !NET20 && !WINDOWS_PHONE
#if !NET20
MemoryStream ms = new MemoryStream();
DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(Dictionary<string, object>));
serializer.WriteObject(ms, testDictionary);
@@ -432,7 +432,7 @@ keyword such as type of business.""
CollectionAssert.AreEqual(r1, r2);
}
#if !NET20 && !WINDOWS_PHONE
#if !NET20
[Test]
public void Unicode()
{
@@ -2123,7 +2123,7 @@ Path '', line 1, position 1.",
});
}
#if !(NET35 || NET20 || WINDOWS_PHONE)
#if !(NET35 || NET20)
[Test]
public void CannotDeserializeArrayIntoDynamic()
{
@@ -2783,7 +2783,7 @@ Path '', line 1, position 2.",
public string Ethnicity { get; set; }
}
#if !NET20 && !WINDOWS_PHONE
#if !NET20
public class DataContractJsonSerializerTestClass
{
public TimeSpan TimeSpanProperty { get; set; }
@@ -4318,7 +4318,7 @@ To fix this error either change the environment to be fully trusted, change the
}", json);
}
#if !(NET35 || NET20 || WINDOWS_PHONE)
#if !(NET35 || NET20)
[Test]
public void SerializeExpandoObject()
{
@@ -7395,7 +7395,7 @@ Parameter name: value",
}
#endif
#if !(PORTABLE || NET20 || NET35 || WINDOWS_PHONE)
#if !(PORTABLE || NET20 || NET35)
[Test]
public void HashSetInterface()
{
@@ -32,7 +32,7 @@ using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using TestFixture = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestClassAttribute;
using Test = Microsoft.VisualStudio.TestPlatform.UnitTestFramework.TestMethodAttribute;
#endif
#if !(NET20 || NET35 || WINDOWS_PHONE)
#if !(NET20 || NET35)
using System.Dynamic;
#endif
using System.Runtime.Serialization;
@@ -210,7 +210,7 @@ namespace Newtonsoft.Json.Tests.Serialization
}
#endif
#if !(NET20 || NET35 || WINDOWS_PHONE)
#if !(NET20 || NET35)
public class DictionaryDynamicObject : DynamicObject
{
public IDictionary<string, object> Values { get; private set; }
@@ -612,7 +612,7 @@ namespace Newtonsoft.Json.Tests.Serialization
Assert.AreEqual(@"Unexpected end when deserializing object. Path 'events2.code', line 1, position 49.", errors[1]);
}
#if !(NET35 || NET20 || WINDOWS_PHONE)
#if !(NET35 || NET20)
[Test]
public void ErrorHandlingEndOfContentDynamic()
{
@@ -24,7 +24,7 @@
#endregion
#if !PORTABLE
#if !(NET35 || NET20 || WINDOWS_PHONE || PORTABLE)
#if !(NET35 || NET20 || PORTABLE)
using System.Dynamic;
#endif
using System.Text;
@@ -1445,7 +1445,7 @@ namespace Newtonsoft.Json.Tests.Serialization
Assert.AreEqual(1, (int)j["MyProperty"]);
}
#if !(NET35 || NET20 || WINDOWS_PHONE)
#if !(NET35 || NET20)
[Test]
public void PropertyItemTypeNameHandlingDynamic()
{
@@ -1651,7 +1651,7 @@ namespace Newtonsoft.Json.Tests.Serialization
public TypeNameHandlingTestObject Data { get; set; }
}
#if !(NET35 || NET20 || WINDOWS_PHONE)
#if !(NET35 || NET20)
public class PropertyItemTypeNameHandlingDynamic
{
[JsonProperty(ItemTypeNameHandling = TypeNameHandling.All)]