diff --git a/Build/build.ps1 b/Build/build.ps1
index db021a26..05f44f75 100644
--- a/Build/build.ps1
+++ b/Build/build.ps1
@@ -1,6 +1,6 @@
properties {
- $zipFileName = "Json35r8.zip"
+ $zipFileName = "Json40r1.zip"
$signAssemblies = $false
$signKeyPath = "D:\Development\Releases\newtonsoft.snk"
$buildDocumentation = $false
@@ -14,6 +14,7 @@
$workingDir = "$baseDir\Working"
$builds = @(
@{Name = "Newtonsoft.Json"; TestsName = "Newtonsoft.Json.Tests"; Constants=""; FinalDir="DotNet"; Framework="net-4.0"},
+ @{Name = "Newtonsoft.Json.Phone"; TestsName = $null; Constants="SILVERLIGHT;WINDOWS_PHONE"; FinalDir="Phone"; Framework="net-4.0"},
@{Name = "Newtonsoft.Json.Silverlight"; TestsName = "Newtonsoft.Json.Tests.Silverlight"; Constants="SILVERLIGHT"; FinalDir="Silverlight"; Framework="net-2.0"},
@{Name = "Newtonsoft.Json.Net20"; TestsName = "Newtonsoft.Json.Tests.Net20"; Constants="NET20"; FinalDir="DotNet20"; Framework="net-2.0"},
@{Name = "Newtonsoft.Json.Net35"; TestsName = "Newtonsoft.Json.Tests.Net35"; Constants="NET35"; FinalDir="DotNet35"; Framework="net-2.0"}
@@ -103,18 +104,21 @@ task Test -depends Deploy {
foreach ($build in $builds)
{
$name = $build.TestsName
- $finalDir = $build.FinalDir
- $framework = $build.Framework
-
- Write-Host -ForegroundColor Green "Copying test assembly $name to deployed directory"
- Write-Host
- robocopy ".\Src\Newtonsoft.Json.Tests\bin\Release\$finalDir" $workingDir\Deployed\Bin\$finalDir /NP /XO /XF LinqBridge.dll
-
- Copy-Item -Path ".\Src\Newtonsoft.Json.Tests\bin\Release\$finalDir\$name.dll" -Destination $workingDir\Deployed\Bin\$finalDir\
+ if ($name -ne $null)
+ {
+ $finalDir = $build.FinalDir
+ $framework = $build.Framework
+
+ Write-Host -ForegroundColor Green "Copying test assembly $name to deployed directory"
+ Write-Host
+ robocopy ".\Src\Newtonsoft.Json.Tests\bin\Release\$finalDir" $workingDir\Deployed\Bin\$finalDir /NP /XO /XF LinqBridge.dll
+
+ Copy-Item -Path ".\Src\Newtonsoft.Json.Tests\bin\Release\$finalDir\$name.dll" -Destination $workingDir\Deployed\Bin\$finalDir\
- Write-Host -ForegroundColor Green "Running tests " $name
- Write-Host
- exec { .\Tools\NUnit\nunit-console.exe "$workingDir\Deployed\Bin\$finalDir\$name.dll" /framework=$framework /xml:$workingDir\$name.xml } "Error running $name tests"
+ Write-Host -ForegroundColor Green "Running tests " $name
+ Write-Host
+ exec { .\Tools\NUnit\nunit-console.exe "$workingDir\Deployed\Bin\$finalDir\$name.dll" /framework=$framework /xml:$workingDir\$name.xml } "Error running $name tests"
+ }
}
}
diff --git a/Doc/versions.txt b/Doc/versions.txt
index db80f156..01e057b9 100644
--- a/Doc/versions.txt
+++ b/Doc/versions.txt
@@ -3,7 +3,10 @@ Versions:
Json.NET comes in different versions for the various .NET frameworks.
-DotNet:
- .NET latest (3.5 SP1)
+ .NET latest (4.0)
+
+-DotNet35:
+ .NET 3.5, Mono
-DotNet20:
.NET 2.0
@@ -11,5 +14,5 @@ Json.NET comes in different versions for the various .NET frameworks.
-Silverlight:
Silverlight 3.0
--Compact:
- Compact Framework 3.5
\ No newline at end of file
+-Phone:
+ Windows Phone 7
\ No newline at end of file
diff --git a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Phone.csproj b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Phone.csproj
new file mode 100644
index 00000000..034f400d
--- /dev/null
+++ b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Phone.csproj
@@ -0,0 +1,229 @@
+
+
+
+ Debug
+ AnyCPU
+ 10.0.20506
+ 2.0
+ {5ED71C8C-D0A6-487C-9A8C-BB855ECEAF75}
+ {C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
+ Library
+ Properties
+ Newtonsoft.Json.Tests.Phone
+ Newtonsoft.Json.Tests.Phone
+ v4.0
+ $(TargetFrameworkVersion)
+ WindowsPhone
+ Silverlight
+ false
+ true
+ true
+
+
+ true
+ full
+ false
+ Bin\Debug\Phone\
+ DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE
+ true
+ true
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ Bin\Release\Phone\
+ TRACE;SILVERLIGHT;WINDOWS_PHONE
+ true
+ true
+ prompt
+ 4
+
+
+
+ ..\Lib\NUnit\Silverlight\nunit.framework.dll
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {7A7F70AB-5C07-47ED-BDD2-ECC14DBACA5E}
+ Newtonsoft.Json.Phone
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerTest.cs b/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerTest.cs
index 09587b81..a49318fe 100644
--- a/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerTest.cs
+++ b/Src/Newtonsoft.Json.Tests/Serialization/JsonSerializerTest.cs
@@ -41,7 +41,7 @@ using System.Collections.ObjectModel;
using Newtonsoft.Json.Linq;
using System.Linq;
using Newtonsoft.Json.Converters;
-#if !PocketPC && !NET20
+#if !PocketPC && !NET20 && !WINDOWS_PHONE
using System.Runtime.Serialization.Json;
#endif
using Newtonsoft.Json.Tests.TestObjects;
@@ -149,7 +149,7 @@ namespace Newtonsoft.Json.Tests.Serialization
string jsonText = JsonConvert.SerializeObject(testDictionary);
-#if !PocketPC && !NET20
+#if !PocketPC && !NET20 && !WINDOWS_PHONE
MemoryStream ms = new MemoryStream();
DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(Dictionary));
serializer.WriteObject(ms, testDictionary);
@@ -409,7 +409,7 @@ keyword such as type of business.""
CollectionAssert.AreEqual(r1, r2);
}
-#if !PocketPC && !NET20
+#if !PocketPC && !NET20 && !WINDOWS_PHONE
[Test]
public void Unicode()
{
@@ -2374,7 +2374,7 @@ keyword such as type of business.""
public string Ethnicity { get; set; }
}
-#if !NET20 && !PocketPC
+#if !NET20 && !PocketPC && !WINDOWS_PHONE
public class DataContractJsonSerializerTestClass
{
public TimeSpan TimeSpanProperty { get; set; }
diff --git a/Src/Newtonsoft.Json/Newtonsoft.Json.Phone.csproj b/Src/Newtonsoft.Json/Newtonsoft.Json.Phone.csproj
new file mode 100644
index 00000000..c6bfcdb0
--- /dev/null
+++ b/Src/Newtonsoft.Json/Newtonsoft.Json.Phone.csproj
@@ -0,0 +1,212 @@
+
+
+
+ Debug
+ AnyCPU
+ 10.0.20506
+ 2.0
+ {7A7F70AB-5C07-47ED-BDD2-ECC14DBACA5E}
+ {C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
+ Library
+ Properties
+ Newtonsoft.Json.Phone
+ Newtonsoft.Json.Phone
+ v4.0
+ $(TargetFrameworkVersion)
+ WindowsPhone
+ Silverlight
+ false
+ true
+ true
+
+
+ true
+ full
+ false
+ Bin\Debug\Phone\
+ DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE
+ true
+ true
+ prompt
+ 4
+
+
+
+
+ pdbonly
+ true
+ Bin\Release\Phone\
+ TRACE;SILVERLIGHT;WINDOWS_PHONE
+ true
+ true
+ prompt
+ 4
+ Bin\Release\Phone\Newtonsoft.Json.Phone.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs b/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs
index 8862465b..386816fe 100644
--- a/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs
+++ b/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs
@@ -43,7 +43,9 @@ using System.Security;
#if !SIGNED
-#if SILVERLIGHT
+#if WINDOWS_PHONE
+[assembly: InternalsVisibleTo("Newtonsoft.Json.Tests.Phone")]
+#elif SILVERLIGHT
[assembly: InternalsVisibleTo("Newtonsoft.Json.Tests.Silverlight")]
#elif PocketPC
[assembly: InternalsVisibleTo("Newtonsoft.Json.Tests.Compact")]
@@ -57,7 +59,9 @@ using System.Security;
#else
-#if SILVERLIGHT
+#if WINDOWS_PHONE
+[assembly: InternalsVisibleTo("Newtonsoft.Json.Tests.Phone, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f561df277c6c0b497d629032b410cdcf286e537c054724f7ffa0164345f62b3e642029d7a80cc351918955328c4adc8a048823ef90b0cf38ea7db0d729caf2b633c3babe08b0310198c1081995c19029bc675193744eab9d7345b8a67258ec17d112cebdbbb2a281487dceeafb9d83aa930f32103fbe1d2911425bc5744002c7")]
+#elif SILVERLIGHT
[assembly: InternalsVisibleTo("Newtonsoft.Json.Tests.Silverlight, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f561df277c6c0b497d629032b410cdcf286e537c054724f7ffa0164345f62b3e642029d7a80cc351918955328c4adc8a048823ef90b0cf38ea7db0d729caf2b633c3babe08b0310198c1081995c19029bc675193744eab9d7345b8a67258ec17d112cebdbbb2a281487dceeafb9d83aa930f32103fbe1d2911425bc5744002c7")]
#elif PocketPC
[assembly: InternalsVisibleTo("Newtonsoft.Json.Tests.Compact, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f561df277c6c0b497d629032b410cdcf286e537c054724f7ffa0164345f62b3e642029d7a80cc351918955328c4adc8a048823ef90b0cf38ea7db0d729caf2b633c3babe08b0310198c1081995c19029bc675193744eab9d7345b8a67258ec17d112cebdbbb2a281487dceeafb9d83aa930f32103fbe1d2911425bc5744002c7")]