This commit is contained in:
James Newton-King
2013-02-02 21:16:15 +13:00
parent 0db89bf5fa
commit 95dd0c0ba4
3 changed files with 24 additions and 3 deletions
+3 -2
View File
@@ -5,8 +5,9 @@
$version = GetVersion $majorWithReleaseVersion
$signAssemblies = $false
$signKeyPath = "D:\Development\Releases\newtonsoft.snk"
$buildDocumentation = $true
$buildDocumentation = $false
$buildNuGet = $false
$treatWarningsAsErrors = $false
$baseDir = resolve-path ..
$buildDir = "$baseDir\Build"
@@ -59,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" (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" (GetConstants $build.Constants $sign) ".\Src\$name.sln" | Out-Default } "Error building $name"
}
}
+1 -1
View File
@@ -1,2 +1,2 @@
powershell -Command "& { [Console]::WindowWidth = 200; [Console]::WindowHeight = 50; Start-Transcript runbuild.txt; Import-Module ..\Tools\PSake\psake.psm1; Invoke-psake .\build.ps1 %*; Stop-Transcript; }"
powershell -Command "& { [Console]::WindowWidth = 150; [Console]::WindowHeight = 50; Start-Transcript runbuild.txt; Import-Module ..\Tools\PSake\psake.psm1; Invoke-psake .\build.ps1 %*; Stop-Transcript; }"
pause
@@ -7145,6 +7145,26 @@ Parameter name: value",
]", json);
}
[Test]
public void DateFormatStringForInternetExplorer()
{
IList<object> dates = new List<object>
{
new DateTime(2000, 12, 12, 12, 12, 12, DateTimeKind.Utc),
new DateTimeOffset(2000, 12, 12, 12, 12, 12, TimeSpan.FromHours(1))
};
string json = JsonConvert.SerializeObject(dates, Formatting.Indented, new JsonSerializerSettings
{
DateFormatString = @"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffK"
});
Assert.AreEqual(@"[
""2000-12-12T12:12:12.000Z"",
""2000-12-12T12:12:12.000+01:00""
]", json);
}
[Test]
public void JsonSerializerDateFormatString()
{