From f2e81c7fdf4c641068f3d5e316ebda022ea4002f Mon Sep 17 00:00:00 2001 From: James South Date: Sat, 4 Oct 2014 12:23:24 +0100 Subject: [PATCH] Revert "Changes build process so that both .Net4 and .Net45 libs are built" This reverts commit 652ac8b4b2b287a33c672bd113c87575b5ca2282 [formerly 79785b82a85672549094ea67000afc779b3ab1b0] [formerly a467c2f8b54ae1c34053dbbbfecacfdc3e185467]. Former-commit-id: 6617c17a6c4bfd638a579c6a1d2a32c4bd2f1bce Former-commit-id: c9282aa247b798d47b3bae436b3a75d0310d96fc --- build/NuSpecs/ImageProcessor.nuspec | 1 - build/build.ps1 | 31 +++++++++--------------- build/build.xml | 17 +++---------- src/ImageProcessor/ImageProcessor.csproj | 22 ++++++++++++++--- 4 files changed, 35 insertions(+), 36 deletions(-) diff --git a/build/NuSpecs/ImageProcessor.nuspec b/build/NuSpecs/ImageProcessor.nuspec index 3caf71005..25f95dee8 100644 --- a/build/NuSpecs/ImageProcessor.nuspec +++ b/build/NuSpecs/ImageProcessor.nuspec @@ -29,7 +29,6 @@ - diff --git a/build/build.ps1 b/build/build.ps1 index ecd0661bd..0eb0efb55 100644 --- a/build/build.ps1 +++ b/build/build.ps1 @@ -76,28 +76,21 @@ task Build-Solution -depends Cleanup-Binaries, Set-VersionNumber { Write-Host "Building projects" # build the projects - # 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 + $PROJECTS.projects.project | % { + if ($_.projfile -eq $null -or $_.projfile -eq "") { + return # breaks out of ForEach-Object loop } - - $projectPath = Resolve-Path $project.folder - Write-Host "Building project $($project.name) at version $($project.version)" + + $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 $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 - } + Update-AssemblyInfo -file (Join-Path $projectPath "Properties\AssemblyInfo.cs") -version $_.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 } } } diff --git a/build/build.xml b/build/build.xml index 1e9190fe1..dd5e75a0e 100644 --- a/build/build.xml +++ b/build/build.xml @@ -4,10 +4,7 @@ 2.1.0.0 ..\src\ImageProcessor ImageProcessor.csproj - - - - + ImageProcessor\lib\net45 ImageProcessor.nuspec @@ -16,9 +13,7 @@ 4.1.0.0 ..\src\ImageProcessor.Web ImageProcessor.Web.csproj - - - + ImageProcessor.Web\lib\net45 ImageProcessor.Web.nuspec @@ -33,9 +28,7 @@ 1.0.0.0 ..\src\Plugins\ImageProcessor\ImageProcessor.Plugins.Cair ImageProcessor.Plugins.Cair.csproj - - - + ImageProcessor.Plugins.Cair\lib\net45 ImageProcessor.Plugins.Cair.nuspec @@ -44,9 +37,7 @@ 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 c5f4a8146..ad4363c1f 100644 --- a/src/ImageProcessor/ImageProcessor.csproj +++ b/src/ImageProcessor/ImageProcessor.csproj @@ -25,7 +25,7 @@ full false bin\Debug\ - DEBUG;TRACE;NET45 + DEBUG;TRACE prompt 4 bin\Debug\ImageProcessor.XML @@ -54,7 +54,7 @@ pdbonly true bin\Release\ - TRACE;NET45 + TRACE prompt 4 bin\Release\ImageProcessor.XML @@ -80,7 +80,7 @@ true bin\All\ - DEBUG;TRACE;NET45 + DEBUG;TRACE bin\Debug\ImageProcessor.XML full AnyCPU @@ -225,4 +225,20 @@ + + + + + + + + + + \ No newline at end of file