diff --git a/Build/build.ps1 b/Build/build.ps1 index 3282bc18..af6fdfe9 100644 --- a/Build/build.ps1 +++ b/Build/build.ps1 @@ -1,6 +1,6 @@ properties { - $zipFileName = "Json40r2.zip" - $majorVersion = "4.0.2" + $zipFileName = "Json40r3.zip" + $majorVersion = "4.0.3" $version = GetVersion $majorVersion $signAssemblies = $false $signKeyPath = "D:\Development\Releases\newtonsoft.snk" @@ -128,11 +128,11 @@ task Test -depends Deploy { 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\ + Copy-Item -Path ".\Src\Newtonsoft.Json.Tests\bin\Release\$finalDir\Newtonsoft.Json.Tests.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" + exec { .\Tools\NUnit\nunit-console.exe "$workingDir\Deployed\Bin\$finalDir\Newtonsoft.Json.Tests.dll" /framework=$framework /xml:$workingDir\$name.xml } "Error running $name tests" } } } diff --git a/Src/Newtonsoft.Json.Tests/ExceptionTests.cs b/Src/Newtonsoft.Json.Tests/ExceptionTests.cs index cfa560fd..c710c9fd 100644 --- a/Src/Newtonsoft.Json.Tests/ExceptionTests.cs +++ b/Src/Newtonsoft.Json.Tests/ExceptionTests.cs @@ -1,4 +1,29 @@ -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.Linq; using System.Text; diff --git a/Src/Newtonsoft.Json.Tests/JsonArrayAttributeTests.cs b/Src/Newtonsoft.Json.Tests/JsonArrayAttributeTests.cs index dcf8e70b..c3701812 100644 --- a/Src/Newtonsoft.Json.Tests/JsonArrayAttributeTests.cs +++ b/Src/Newtonsoft.Json.Tests/JsonArrayAttributeTests.cs @@ -1,4 +1,29 @@ -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.Linq; using System.Text; diff --git a/Src/Newtonsoft.Json.Tests/LinqToSql/LinqToSqlClasses.designer.cs b/Src/Newtonsoft.Json.Tests/LinqToSql/LinqToSqlClasses.designer.cs index 61df42ca..265362d4 100644 --- a/Src/Newtonsoft.Json.Tests/LinqToSql/LinqToSqlClasses.designer.cs +++ b/Src/Newtonsoft.Json.Tests/LinqToSql/LinqToSqlClasses.designer.cs @@ -2,7 +2,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.1 +// Runtime Version:4.0.30319.237 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net20.csproj b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net20.csproj index 33061ae3..190081ab 100644 --- a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net20.csproj +++ b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net20.csproj @@ -9,7 +9,7 @@ Library Properties Newtonsoft.Json.Tests - Newtonsoft.Json.Tests.Net20 + Newtonsoft.Json.Tests diff --git a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net35.csproj b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net35.csproj index 530768ea..b1729d79 100644 --- a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net35.csproj +++ b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Net35.csproj @@ -8,8 +8,8 @@ {3E6E2335-B079-4B5B-A65A-9D586914BCBB} Library Properties - Newtonsoft.Json.Tests.Net35 - Newtonsoft.Json.Tests.Net35 + Newtonsoft.Json.Tests + Newtonsoft.Json.Tests diff --git a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Silverlight.csproj b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Silverlight.csproj index 3726e8db..4d24a808 100644 --- a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Silverlight.csproj +++ b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.Silverlight.csproj @@ -12,8 +12,8 @@ {A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} Library Properties - Newtonsoft.Json.Tests.Silverlight - Newtonsoft.Json.Tests.Silverlight + Newtonsoft.Json.Tests + Newtonsoft.Json.Tests v4.0 false diff --git a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.WindowsPhone.csproj b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.WindowsPhone.csproj index 30152672..5357dbc8 100644 --- a/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.WindowsPhone.csproj +++ b/Src/Newtonsoft.Json.Tests/Newtonsoft.Json.Tests.WindowsPhone.csproj @@ -9,8 +9,8 @@ {C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} Library Properties - Newtonsoft.Json.Tests.WindowsPhone - Newtonsoft.Json.Tests.WindowsPhone + Newtonsoft.Json.Tests + Newtonsoft.Json.Tests v4.0 $(TargetFrameworkVersion) WindowsPhone diff --git a/Src/Newtonsoft.Json.Tests/Properties/AssemblyInfo.cs b/Src/Newtonsoft.Json.Tests/Properties/AssemblyInfo.cs index 4c00c76b..a83aef1d 100644 --- a/Src/Newtonsoft.Json.Tests/Properties/AssemblyInfo.cs +++ b/Src/Newtonsoft.Json.Tests/Properties/AssemblyInfo.cs @@ -1,3 +1,28 @@ +#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.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -39,7 +64,7 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("4.0.2.0")] +[assembly: AssemblyVersion("4.0.3.0")] #if !PocketPC -[assembly: AssemblyFileVersion("4.0.2.14201")] +[assembly: AssemblyFileVersion("4.0.3.14201")] #endif diff --git a/Src/Newtonsoft.Json/Newtonsoft.Json.Net20.csproj b/Src/Newtonsoft.Json/Newtonsoft.Json.Net20.csproj index 71c9985b..d627e511 100644 --- a/Src/Newtonsoft.Json/Newtonsoft.Json.Net20.csproj +++ b/Src/Newtonsoft.Json/Newtonsoft.Json.Net20.csproj @@ -9,7 +9,7 @@ Library Properties Newtonsoft.Json - Newtonsoft.Json.Net20 + Newtonsoft.Json false @@ -51,7 +51,7 @@ TRACE;DEBUG;NET20 prompt 4 - bin\Debug\Net20\Newtonsoft.Json.Net20.xml + bin\Debug\Net20\Newtonsoft.Json.xml true @@ -64,7 +64,7 @@ TRACE;NET20 prompt 4 - bin\Release\Net20\Newtonsoft.Json.Net20.xml + bin\Release\Net20\Newtonsoft.Json.xml AllRules.ruleset diff --git a/Src/Newtonsoft.Json/Newtonsoft.Json.Net35.csproj b/Src/Newtonsoft.Json/Newtonsoft.Json.Net35.csproj index f4b3f4be..bf9867eb 100644 --- a/Src/Newtonsoft.Json/Newtonsoft.Json.Net35.csproj +++ b/Src/Newtonsoft.Json/Newtonsoft.Json.Net35.csproj @@ -8,8 +8,8 @@ {A9AE40FF-1A21-414A-9FE7-3BE13644CC6D} Library Properties - Newtonsoft.Json.Net35 - Newtonsoft.Json.Net35 + Newtonsoft.Json + Newtonsoft.Json false @@ -52,7 +52,7 @@ TRACE;DEBUG;CODE_ANALYSIS;NET35 prompt 4 - bin\Debug\Net35\Newtonsoft.Json.Net35.xml + bin\Debug\Net35\Newtonsoft.Json.xml true @@ -65,7 +65,7 @@ TRACE;NET35 prompt 4 - bin\Release\Net35\Newtonsoft.Json.Net35.xml + bin\Release\Net35\Newtonsoft.Json.xml ..\..\..\..\trunk\Src\Newtonsoft.Json\Newtonsoft.Json.ruleset false diff --git a/Src/Newtonsoft.Json/Newtonsoft.Json.Silverlight.csproj b/Src/Newtonsoft.Json/Newtonsoft.Json.Silverlight.csproj index 96815c01..68c0ffa6 100644 --- a/Src/Newtonsoft.Json/Newtonsoft.Json.Silverlight.csproj +++ b/Src/Newtonsoft.Json/Newtonsoft.Json.Silverlight.csproj @@ -13,7 +13,7 @@ Library Properties Newtonsoft.Json - Newtonsoft.Json.Silverlight + Newtonsoft.Json v4.0 false true @@ -53,7 +53,7 @@ true prompt 4 - Bin\Debug\Silverlight\Newtonsoft.Json.Silverlight.xml + Bin\Debug\Silverlight\Newtonsoft.Json.xml Newtonsoft.Json.ruleset true @@ -66,7 +66,7 @@ true prompt 4 - Bin\Release\Silverlight\Newtonsoft.Json.Silverlight.xml + Bin\Release\Silverlight\Newtonsoft.Json.xml AllRules.ruleset diff --git a/Src/Newtonsoft.Json/Newtonsoft.Json.WindowsPhone.csproj b/Src/Newtonsoft.Json/Newtonsoft.Json.WindowsPhone.csproj index 766277d0..0a4c9f73 100644 --- a/Src/Newtonsoft.Json/Newtonsoft.Json.WindowsPhone.csproj +++ b/Src/Newtonsoft.Json/Newtonsoft.Json.WindowsPhone.csproj @@ -9,8 +9,8 @@ {C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} Library Properties - Newtonsoft.Json.WindowsPhone - Newtonsoft.Json.WindowsPhone + Newtonsoft.Json + Newtonsoft.Json v4.0 $(TargetFrameworkVersion) WindowsPhone @@ -41,7 +41,7 @@ true prompt 4 - Bin\Release\WindowsPhone\Newtonsoft.Json.WindowsPhone.xml + Bin\Release\WindowsPhone\Newtonsoft.Json.xml diff --git a/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs b/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs index da88140e..35ab33f8 100644 --- a/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs +++ b/Src/Newtonsoft.Json/Properties/AssemblyInfo.cs @@ -1,20 +1,26 @@ #region License -// Copyright 2006 James Newton-King -// http://www.newtonsoft.com +// Copyright (c) 2007 James Newton-King // -// This work is licensed under the Creative Commons Attribution 2.5 License -// http://creativecommons.org/licenses/by/2.5/ +// 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: // -// You are free: -// * to copy, distribute, display, and perform the work -// * to make derivative works -// * to make commercial use of the work +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. // -// Under the following conditions: -// * You must attribute the work in the manner specified by the author or licensor: -// - If you find this component useful a link to http://www.newtonsoft.com would be appreciated. -// * For any reuse or distribution, you must make clear to others the license terms of this work. -// * Any of these conditions can be waived if you get permission from the copyright holder. +// 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; @@ -44,39 +50,11 @@ using System.Security; #endif #if !SIGNED - -#if WINDOWS_PHONE -[assembly: InternalsVisibleTo("Newtonsoft.Json.Tests.WindowsPhone")] -#elif SILVERLIGHT -[assembly: InternalsVisibleTo("Newtonsoft.Json.Tests.Silverlight")] -#elif PocketPC -[assembly: InternalsVisibleTo("Newtonsoft.Json.Tests.Compact")] -#elif NET20 -[assembly: InternalsVisibleTo("Newtonsoft.Json.Tests.Net20")] -#elif NET35 -[assembly: InternalsVisibleTo("Newtonsoft.Json.Tests.Net35")] -#else [assembly: InternalsVisibleTo("Newtonsoft.Json.Tests")] -#endif - -#else - -#if WINDOWS_PHONE -[assembly: InternalsVisibleTo("Newtonsoft.Json.Tests.WindowsPhone, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f561df277c6c0b497d629032b410cdcf286e537c054724f7ffa0164345f62b3e642029d7a80cc351918955328c4adc8a048823ef90b0cf38ea7db0d729caf2b633c3babe08b0310198c1081995c19029bc675193744eab9d7345b8a67258ec17d112cebdbbb2a281487dceeafb9d83aa930f32103fbe1d2911425bc5744002c7")] -#elif SILVERLIGHT -[assembly: InternalsVisibleTo("Newtonsoft.Json.Tests.Silverlight, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f561df277c6c0b497d629032b410cdcf286e537c054724f7ffa0164345f62b3e642029d7a80cc351918955328c4adc8a048823ef90b0cf38ea7db0d729caf2b633c3babe08b0310198c1081995c19029bc675193744eab9d7345b8a67258ec17d112cebdbbb2a281487dceeafb9d83aa930f32103fbe1d2911425bc5744002c7")] -#elif PocketPC -[assembly: InternalsVisibleTo("Newtonsoft.Json.Tests.Compact, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f561df277c6c0b497d629032b410cdcf286e537c054724f7ffa0164345f62b3e642029d7a80cc351918955328c4adc8a048823ef90b0cf38ea7db0d729caf2b633c3babe08b0310198c1081995c19029bc675193744eab9d7345b8a67258ec17d112cebdbbb2a281487dceeafb9d83aa930f32103fbe1d2911425bc5744002c7")] -#elif NET20 -[assembly: InternalsVisibleTo("Newtonsoft.Json.Tests.Net20, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f561df277c6c0b497d629032b410cdcf286e537c054724f7ffa0164345f62b3e642029d7a80cc351918955328c4adc8a048823ef90b0cf38ea7db0d729caf2b633c3babe08b0310198c1081995c19029bc675193744eab9d7345b8a67258ec17d112cebdbbb2a281487dceeafb9d83aa930f32103fbe1d2911425bc5744002c7")] -#elif NET35 -[assembly: InternalsVisibleTo("Newtonsoft.Json.Tests.Net35, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f561df277c6c0b497d629032b410cdcf286e537c054724f7ffa0164345f62b3e642029d7a80cc351918955328c4adc8a048823ef90b0cf38ea7db0d729caf2b633c3babe08b0310198c1081995c19029bc675193744eab9d7345b8a67258ec17d112cebdbbb2a281487dceeafb9d83aa930f32103fbe1d2911425bc5744002c7")] #else [assembly: InternalsVisibleTo("Newtonsoft.Json.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f561df277c6c0b497d629032b410cdcf286e537c054724f7ffa0164345f62b3e642029d7a80cc351918955328c4adc8a048823ef90b0cf38ea7db0d729caf2b633c3babe08b0310198c1081995c19029bc675193744eab9d7345b8a67258ec17d112cebdbbb2a281487dceeafb9d83aa930f32103fbe1d2911425bc5744002c7")] #endif -#endif - [assembly: InternalsVisibleTo("Newtonsoft.Json.Dynamic, PublicKey=0024000004800000940000000602000000240000525341310004000001000100cbd8d53b9d7de30f1f1278f636ec462cf9c254991291e66ebb157a885638a517887633b898ccbcf0d5c5ff7be85a6abe9e765d0ac7cd33c68dac67e7e64530e8222101109f154ab14a941c490ac155cd1d4fcba0fabb49016b4ef28593b015cab5937da31172f03f67d09edda404b88a60023f062ae71d0b2e4438b74cc11dc9")] @@ -108,9 +86,9 @@ using System.Security; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("4.0.2.0")] +[assembly: AssemblyVersion("4.0.3.0")] #if !PocketPC -[assembly: AssemblyFileVersion("4.0.2.14201")] +[assembly: AssemblyFileVersion("4.0.3.14201")] #endif [assembly: CLSCompliant(true)] diff --git a/Src/Newtonsoft.Json/Utilities/DynamicWrapper.cs b/Src/Newtonsoft.Json/Utilities/DynamicWrapper.cs index 0df9f4ac..f2b37c2f 100644 --- a/Src/Newtonsoft.Json/Utilities/DynamicWrapper.cs +++ b/Src/Newtonsoft.Json/Utilities/DynamicWrapper.cs @@ -53,17 +53,12 @@ namespace Newtonsoft.Json.Utilities private static byte[] GetStrongKey() { - string name; -#if NET35 - name = "Newtonsoft.Json.Net35.Dynamic.snk"; -#else - name = "Newtonsoft.Json.Dynamic.snk"; -#endif + string name ="Newtonsoft.Json.Dynamic.snk"; using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(name)) { if (stream == null) - throw new MissingManifestResourceException("Should have a Newtonsoft.Json.Dynamic.snk as an embedded resource."); + throw new MissingManifestResourceException("Should have " + name + " as an embedded resource."); int length = (int)stream.Length; byte[] buffer = new byte[length];