-Added NuPack to build process

-Fixed deserializing structs when reusing existing values
-Renamed Windows Phone 7 dll to Newtonsoft.Json.WindowsPhone.dll
This commit is contained in:
JamesNK
2010-10-12 07:15:13 +00:00
parent 4cea6d3c09
commit 336f14b3d2
14 changed files with 108 additions and 41 deletions
@@ -47,11 +47,11 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\DotNet20\</OutputPath>
<OutputPath>bin\Debug\Net20\</OutputPath>
<DefineConstants>TRACE;DEBUG;NET20</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\DotNet20\Newtonsoft.Json.Net20.xml</DocumentationFile>
<DocumentationFile>bin\Debug\Net20\Newtonsoft.Json.Net20.xml</DocumentationFile>
<RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisRules>
</CodeAnalysisRules>
@@ -60,11 +60,11 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\DotNet20\</OutputPath>
<OutputPath>bin\Release\Net20\</OutputPath>
<DefineConstants>TRACE;NET20</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Release\DotNet20\Newtonsoft.Json.Net20.xml</DocumentationFile>
<DocumentationFile>bin\Release\Net20\Newtonsoft.Json.Net20.xml</DocumentationFile>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
@@ -48,11 +48,11 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\DotNet35\</OutputPath>
<OutputPath>bin\Debug\Net35\</OutputPath>
<DefineConstants>TRACE;DEBUG;CODE_ANALYSIS;NET35</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\DotNet35\Newtonsoft.Json.Net35.xml</DocumentationFile>
<DocumentationFile>bin\Debug\Net35\Newtonsoft.Json.Net35.xml</DocumentationFile>
<RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisRules>
</CodeAnalysisRules>
@@ -61,12 +61,12 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\DotNet35\</OutputPath>
<OutputPath>bin\Release\Net35\</OutputPath>
<DefineConstants>TRACE;NET35</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Release\DotNet35\Newtonsoft.Json.Net35.xml</DocumentationFile>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>bin\Release\Net35\Newtonsoft.Json.Net35.xml</DocumentationFile>
<CodeAnalysisRuleSet>..\..\..\..\trunk\Src\Newtonsoft.Json\Newtonsoft.Json.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>true</RunCodeAnalysis>
</PropertyGroup>
<ItemGroup>
@@ -9,8 +9,8 @@
<ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Newtonsoft.Json.Phone</RootNamespace>
<AssemblyName>Newtonsoft.Json.Phone</AssemblyName>
<RootNamespace>Newtonsoft.Json.WindowsPhone</RootNamespace>
<AssemblyName>Newtonsoft.Json.WindowsPhone</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
<TargetFrameworkProfile>WindowsPhone</TargetFrameworkProfile>
@@ -23,7 +23,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Bin\Debug\Phone\</OutputPath>
<OutputPath>Bin\Debug\WindowsPhone\</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
@@ -35,13 +35,13 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Bin\Release\Phone\</OutputPath>
<OutputPath>Bin\Release\WindowsPhone\</OutputPath>
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>Bin\Release\Phone\Newtonsoft.Json.Phone.xml</DocumentationFile>
<DocumentationFile>Bin\Release\WindowsPhone\Newtonsoft.Json.WindowsPhone.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System.Runtime.Serialization" />
+4 -4
View File
@@ -48,11 +48,11 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\DotNet\</OutputPath>
<OutputPath>bin\Debug\Net\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Debug\DotNet\Newtonsoft.Json.xml</DocumentationFile>
<DocumentationFile>bin\Debug\Net\Newtonsoft.Json.xml</DocumentationFile>
<RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisRules>
</CodeAnalysisRules>
@@ -61,11 +61,11 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\DotNet\</OutputPath>
<OutputPath>bin\Release\Net\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Release\DotNet\Newtonsoft.Json.xml</DocumentationFile>
<DocumentationFile>bin\Release\Net\Newtonsoft.Json.xml</DocumentationFile>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
@@ -26,7 +26,9 @@ using System.Security;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
#if SILVERLIGHT
#if WINDOWS_PHONE
[assembly: AssemblyTitle("Newtonsoft Json.NET Windows Phone")]
#elif SILVERLIGHT
[assembly: AssemblyTitle("Newtonsoft Json.NET Silverlight")]
#elif PocketPC
[assembly: AssemblyTitle("Newtonsoft Json.NET Compact")]
@@ -44,7 +46,7 @@ using System.Security;
#if !SIGNED
#if WINDOWS_PHONE
[assembly: InternalsVisibleTo("Newtonsoft.Json.Tests.Phone")]
[assembly: InternalsVisibleTo("Newtonsoft.Json.Tests.WindowsPhone")]
#elif SILVERLIGHT
[assembly: InternalsVisibleTo("Newtonsoft.Json.Tests.Silverlight")]
#elif PocketPC
@@ -516,7 +516,10 @@ namespace Newtonsoft.Json.Serialization
currentValue = property.ValueProvider.GetValue(target);
gottenCurrentValue = true;
useExistingValue = (currentValue != null && !property.PropertyType.IsArray && !ReflectionUtils.InheritsGenericDefinition(property.PropertyType, typeof(ReadOnlyCollection<>)));
useExistingValue = (currentValue != null
&& !property.PropertyType.IsArray
&& !ReflectionUtils.InheritsGenericDefinition(property.PropertyType, typeof(ReadOnlyCollection<>))
&& !property.PropertyType.IsValueType);
}
if (!property.Writable && !useExistingValue)