From a4e5bd15a272b3587dc09d038e082a5c36eadac6 Mon Sep 17 00:00:00 2001 From: James South Date: Mon, 6 Oct 2014 19:03:48 +0100 Subject: [PATCH] Revert "Revert "Changes build process so that both .Net4 and .Net45 libs are built"" This reverts commit f67979f83f25a90f1b2b754a47a939bf3ca65de7 [formerly 4297405a390ccbcc9136445e9430e976cc7af1a3] [formerly aa31ae86c57378f17c12cb416112a70dc5349f86]. Former-commit-id: e6fb846c5b291f0c2ee854ddf9e1b2949945997b Former-commit-id: b61fd5df824a3495f0725d1a27ddfebd80e173a2 --- build/NuSpecs/ImageProcessor.nuspec | 1 + build/build.ps1 | 31 +++++++++++++++--------- build/build.xml | 17 ++++++++++--- src/ImageProcessor/ImageProcessor.csproj | 22 +++-------------- 4 files changed, 36 insertions(+), 35 deletions(-) diff --git a/build/NuSpecs/ImageProcessor.nuspec b/build/NuSpecs/ImageProcessor.nuspec index 25f95dee8..3caf71005 100644 --- a/build/NuSpecs/ImageProcessor.nuspec +++ b/build/NuSpecs/ImageProcessor.nuspec @@ -29,6 +29,7 @@ + diff --git a/build/build.ps1 b/build/build.ps1 index 0eb0efb55..ecd0661bd 100644 --- a/build/build.ps1 +++ b/build/build.ps1 @@ -76,21 +76,28 @@ task Build-Solution -depends Cleanup-Binaries, Set-VersionNumber { Write-Host "Building projects" # build the projects - $PROJECTS.projects.project | % { - if ($_.projfile -eq $null -or $_.projfile -eq "") { - return # breaks out of ForEach-Object loop + # regular "$xmlobject.node | % { $_ }" don't work when they're nested: http://fredmorrison.wordpress.com/2013/03/19/reading-xml-with-powershell-why-most-examples-you-see-are-wrong/ + [System.Xml.XmlElement] $root = $PROJECTS.get_DocumentElement() + [System.Xml.XmlElement] $project = $null + foreach($project in $root.ChildNodes) { + if ($project.projfile -eq $null -or $project.projfile -eq "") { + continue # goes to next item } - - $projectPath = Resolve-Path $_.folder - Write-Host "Building project $($_.name) at version $($_.version)" - # it would be possible to update more infos from the xml (description etc), so as to have all infos in one place - Update-AssemblyInfo -file (Join-Path $projectPath "Properties\AssemblyInfo.cs") -version $_.version + $projectPath = Resolve-Path $project.folder + Write-Host "Building project $($project.name) at version $($project.version)" - # using the invoke-expression on a string solves a few character escape issues - $buildCommand = "msbuild $(Join-Path $projectPath $_.projfile) /t:Build /p:Warnings=true /p:Configuration=Release /p:PipelineDependsOnBuild=False /p:OutDir=$(Join-Path $BIN_PATH $($_.output)) /clp:WarningsOnly /clp:ErrorsOnly /clp:Summary /clp:PerformanceSummary /v:Normal /nologo" - Exec { - Invoke-Expression $buildCommand + # it would be possible to update more infos from the xml (description etc), so as to have all infos in one place + Update-AssemblyInfo -file (Join-Path $projectPath "Properties\AssemblyInfo.cs") -version $project.version + + [System.Xml.XmlElement] $output = $null + foreach($output in $project.outputs.ChildNodes) { + # using invoke-expression solves a few character escape issues + $buildCommand = "msbuild $(Join-Path $projectPath $project.projfile) /t:Build /p:Warnings=true /p:Configuration=Release /p:PipelineDependsOnBuild=False /p:OutDir=$(Join-Path $BIN_PATH $output.folder) $($output.additionalParameters) /clp:WarningsOnly /clp:ErrorsOnly /clp:Summary /clp:PerformanceSummary /v:Normal /nologo" + Write-Host $buildCommand -ForegroundColor DarkGreen + Exec { + Invoke-Expression $buildCommand + } } } } diff --git a/build/build.xml b/build/build.xml index dd5e75a0e..1e9190fe1 100644 --- a/build/build.xml +++ b/build/build.xml @@ -4,7 +4,10 @@ 2.1.0.0 ..\src\ImageProcessor ImageProcessor.csproj - ImageProcessor\lib\net45 + + + + ImageProcessor.nuspec @@ -13,7 +16,9 @@ 4.1.0.0 ..\src\ImageProcessor.Web ImageProcessor.Web.csproj - ImageProcessor.Web\lib\net45 + + + ImageProcessor.Web.nuspec @@ -28,7 +33,9 @@ 1.0.0.0 ..\src\Plugins\ImageProcessor\ImageProcessor.Plugins.Cair ImageProcessor.Plugins.Cair.csproj - ImageProcessor.Plugins.Cair\lib\net45 + + + ImageProcessor.Plugins.Cair.nuspec @@ -37,7 +44,9 @@ 1.0.1.0 ..\src\Plugins\ImageProcessor\ImageProcessor.Plugins.WebP ImageProcessor.Plugins.WebP.csproj - ImageProcessor.Plugins.WebP\lib\net45 + + + ImageProcessor.Plugins.WebP.nuspec \ No newline at end of file diff --git a/src/ImageProcessor/ImageProcessor.csproj b/src/ImageProcessor/ImageProcessor.csproj index ad4363c1f..c5f4a8146 100644 --- a/src/ImageProcessor/ImageProcessor.csproj +++ b/src/ImageProcessor/ImageProcessor.csproj @@ -25,7 +25,7 @@ full false bin\Debug\ - DEBUG;TRACE + DEBUG;TRACE;NET45 prompt 4 bin\Debug\ImageProcessor.XML @@ -54,7 +54,7 @@ pdbonly true bin\Release\ - TRACE + TRACE;NET45 prompt 4 bin\Release\ImageProcessor.XML @@ -80,7 +80,7 @@ true bin\All\ - DEBUG;TRACE + DEBUG;TRACE;NET45 bin\Debug\ImageProcessor.XML full AnyCPU @@ -225,20 +225,4 @@ - - - - - - - - - - \ No newline at end of file