From c0baac2b3846b4fd249a3013704f9aebea69cd2a Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Thu, 23 Oct 2014 17:08:35 +0200 Subject: [PATCH 1/3] Should fix the build for real now. Sets GenerateSerializationAssemblies to Off which then doesn't produce umbraco.XmlSerializers.dll any more. Should be safe as this is only used for updatechecker and packageinstaller. From: http://hashtagfail.com/post/5255977780/sgen-loaderexceptions-error - "Visual Studio attempts to generate a serialization assembly containing the types in your solution, to improve XmlSerializer serialization performance, should you choose to serialize your types." Conflicts: build/NuSpecs/tools/install.core.ps1 --- build/Build.proj | 3 -- build/NuSpecs/UmbracoCms.Core.nuspec | 1 - build/NuSpecs/tools/install.core.ps1 | 56 +++++++++++++++++++++++++++- src/Umbraco.Web/Umbraco.Web.csproj | 2 + 4 files changed, 56 insertions(+), 6 deletions(-) diff --git a/build/Build.proj b/build/Build.proj index d37a9b7bb9..37a73aef7f 100644 --- a/build/Build.proj +++ b/build/Build.proj @@ -252,14 +252,11 @@ - - - diff --git a/build/NuSpecs/UmbracoCms.Core.nuspec b/build/NuSpecs/UmbracoCms.Core.nuspec index 94f69f7d4a..7c994d2b5b 100644 --- a/build/NuSpecs/UmbracoCms.Core.nuspec +++ b/build/NuSpecs/UmbracoCms.Core.nuspec @@ -66,7 +66,6 @@ - diff --git a/build/NuSpecs/tools/install.core.ps1 b/build/NuSpecs/tools/install.core.ps1 index c712b363bc..79133a9f6a 100644 --- a/build/NuSpecs/tools/install.core.ps1 +++ b/build/NuSpecs/tools/install.core.ps1 @@ -10,7 +10,7 @@ if ($project) { New-Item -ItemType Directory -Force -Path $backupPath New-Item -ItemType Directory -Force -Path $copyLogsPath - # After backing up, remove all dlls from bin folder in case dll files are included in the VS project + # After backing up, remove all umbraco dlls from bin folder in case dll files are included in the VS project # See: http://issues.umbraco.org/issue/U4-4930 $umbracoBinFolder = Join-Path $projectDestinationPath "bin" if(Test-Path $umbracoBinFolder) { @@ -19,6 +19,58 @@ if ($project) { New-Item -ItemType Directory -Force -Path $umbracoBinBackupPath robocopy $umbracoBinFolder $umbracoBinBackupPath /e /LOG:$copyLogsPath\UmbracoBinBackup.log - Remove-Item $umbracoBinFolder\*.dll -Force -Confirm:$false + + # Delete files Umbraco brings in + if(Test-Path $umbracoBinFolder\businesslogic.dll) { Remove-Item $umbracoBinFolder\businesslogic.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\cms.dll) { Remove-Item $umbracoBinFolder\cms.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\controls.dll) { Remove-Item $umbracoBinFolder\controls.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\interfaces.dll) { Remove-Item $umbracoBinFolder\interfaces.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\log4net.dll) { Remove-Item $umbracoBinFolder\log4net.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\Microsoft.ApplicationBlocks.Data.dll) { Remove-Item $umbracoBinFolder\Microsoft.ApplicationBlocks.Data.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\Microsoft.Web.Helpers.dll) { Remove-Item $umbracoBinFolder\Microsoft.Web.Helpers.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\SQLCE4Umbraco.dll) { Remove-Item $umbracoBinFolder\SQLCE4Umbraco.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\System.Data.SqlServerCe.dll) { Remove-Item $umbracoBinFolder\System.Data.SqlServerCe.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\System.Data.SqlServerCe.Entity.dll) { Remove-Item $umbracoBinFolder\System.Data.SqlServerCe.Entity.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\TidyNet.dll) { Remove-Item $umbracoBinFolder\TidyNet.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\umbraco.dll) { Remove-Item $umbracoBinFolder\umbraco.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\Umbraco.Core.dll) { Remove-Item $umbracoBinFolder\Umbraco.Core.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\umbraco.DataLayer.dll) { Remove-Item $umbracoBinFolder\umbraco.DataLayer.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\umbraco.editorControls.dll) { Remove-Item $umbracoBinFolder\umbraco.editorControls.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\umbraco.MacroEngines.dll) { Remove-Item $umbracoBinFolder\umbraco.MacroEngines.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\umbraco.providers.dll) { Remove-Item $umbracoBinFolder\umbraco.providers.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\Umbraco.Web.UI.dll) { Remove-Item $umbracoBinFolder\Umbraco.Web.UI.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\UmbracoExamine.dll) { Remove-Item $umbracoBinFolder\UmbracoExamine.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\UrlRewritingNet.UrlRewriter.dll) { Remove-Item $umbracoBinFolder\UrlRewritingNet.UrlRewriter.dll -Force -Confirm:$false } + + # Delete files Umbraco depends upon + $amd64Folder = Join-Path $projectDestinationPath "bin\amd64" + if(Test-Path $amd64Folder) { Remove-Item $amd64Folder -Force -Recurse -Confirm:$false } + $x86Folder = Join-Path $projectDestinationPath "bin\x86" + if(Test-Path $x86Folder) { Remove-Item $x86Folder -Force -Recurse -Confirm:$false } + if(Test-Path $umbracoBinFolder\AutoMapper.dll) { Remove-Item $umbracoBinFolder\AutoMapper.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\AutoMapper.Net4.dll) { Remove-Item $umbracoBinFolder\AutoMapper.Net4.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\ClientDependency.Core.dll) { Remove-Item $umbracoBinFolder\ClientDependency.Core.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\ClientDependency.Core.Mvc.dll) { Remove-Item $umbracoBinFolder\ClientDependency.Core.Mvc.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\CookComputing.XmlRpcV2.dll) { Remove-Item $umbracoBinFolder\CookComputing.XmlRpcV2.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\Examine.dll) { Remove-Item $umbracoBinFolder\Examine.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\HtmlAgilityPack.dll) { Remove-Item $umbracoBinFolder\HtmlAgilityPack.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\ICSharpCode.SharpZipLib.dll) { Remove-Item $umbracoBinFolder\ICSharpCode.SharpZipLib.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\ImageProcessor.dll) { Remove-Item $umbracoBinFolder\ImageProcessor.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\ImageProcessor.Web.dll) { Remove-Item $umbracoBinFolder\ImageProcessor.Web.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\Lucene.Net.dll) { Remove-Item $umbracoBinFolder\Lucene.Net.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\Microsoft.Web.Infrastructure.dll) { Remove-Item $umbracoBinFolder\Microsoft.Web.Infrastructure.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\Microsoft.Web.Mvc.FixedDisplayModes.dll) { Remove-Item $umbracoBinFolder\Microsoft.Web.Mvc.FixedDisplayModes.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\MiniProfiler.dll) { Remove-Item $umbracoBinFolder\MiniProfiler.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\MySql.Data.dll) { Remove-Item $umbracoBinFolder\MySql.Data.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\Newtonsoft.Json.dll) { Remove-Item $umbracoBinFolder\Newtonsoft.Json.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\System.Net.Http.Formatting.dll) { Remove-Item $umbracoBinFolder\System.Net.Http.Formatting.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\System.Web.Helpers.dll) { Remove-Item $umbracoBinFolder\System.Web.Helpers.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\System.Web.Http.dll) { Remove-Item $umbracoBinFolder\System.Web.Http.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\System.Web.Http.WebHost.dll) { Remove-Item $umbracoBinFolder\System.Web.Http.WebHost.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\System.Web.Mvc.dll) { Remove-Item $umbracoBinFolder\System.Web.Mvc.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\System.Web.Razor.dll) { Remove-Item $umbracoBinFolder\System.Web.Razor.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\System.Web.WebPages.dll) { Remove-Item $umbracoBinFolder\System.Web.WebPages.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\System.Web.WebPages.Deployment.dll) { Remove-Item $umbracoBinFolder\System.Web.WebPages.Deployment.dll -Force -Confirm:$false } + if(Test-Path $umbracoBinFolder\System.Web.WebPages.Razor.dll) { Remove-Item $umbracoBinFolder\System.Web.WebPages.Razor.dll -Force -Confirm:$false } } } \ No newline at end of file diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index ff16c46f65..0d6a655573 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -65,6 +65,7 @@ prompt AllRules.ruleset false + Off bin\Release\ @@ -89,6 +90,7 @@ prompt AllRules.ruleset false + Off From 9be3bdb8a5e2e2ca0d9baf97e46f58b339f7d552 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Fri, 14 Nov 2014 17:16:33 +0100 Subject: [PATCH 2/3] Makes sure that the very first build on a fresh machine works immediately (previously you'd get an error saying that some NuGet packages were restored and you need to run the build again). --- build/Build.bat | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build/Build.bat b/build/Build.bat index ed29b25d22..5bf6f90cba 100644 --- a/build/Build.bat +++ b/build/Build.bat @@ -17,6 +17,8 @@ SET nuGetFolder=%CD%\..\src\packages\ ..\src\.nuget\NuGet.exe sources Remove -Name MyGetUmbracoCore ..\src\.nuget\NuGet.exe sources Add -Name MyGetUmbracoCore -Source https://www.myget.org/F/umbracocore/api/v2/ ..\src\.nuget\NuGet.exe install ..\src\Umbraco.Web.UI\packages.config -OutputDirectory %nuGetFolder% +..\src\.nuget\NuGet.exe install ..\src\umbraco.businesslogic\packages.config -OutputDirectory %nuGetFolder% +..\src\.nuget\NuGet.exe install ..\src\Umbraco.Core\packages.config -OutputDirectory %nuGetFolder% ECHO Removing the belle build folder to make sure everything is clean as a whistle RD ..\src\Umbraco.Web.UI.Client\build /Q /S From 5aa29cc150ce129c46fd4d799e98906e36c71a99 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Sat, 15 Nov 2014 14:04:19 +0100 Subject: [PATCH 3/3] Adds version comment to UmbracoVersion.txt and makes it possible to overrule by adding arguments to build.bat --- build/Build.bat | 42 +++++++++++++++++++++++++--------------- build/UmbracoVersion.txt | 1 + 2 files changed, 27 insertions(+), 16 deletions(-) diff --git a/build/Build.bat b/build/Build.bat index 5bf6f90cba..f120348f1d 100644 --- a/build/Build.bat +++ b/build/Build.bat @@ -2,9 +2,18 @@ IF NOT EXIST UmbracoVersion.txt ( ECHO UmbracoVersion.txt missing! GOTO :showerror -) -SET /p release= .\_BuildOutput\WebApp\App_Code\dummy.txt -echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\App_Data\dummy.txt -echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\App_Plugins\dummy.txt -echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\css\dummy.txt -echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\masterpages\dummy.txt -echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\media\dummy.txt -echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\scripts\dummy.txt -echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\usercontrols\dummy.txt -echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\Views\Partials\dummy.txt -echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\Views\MacroPartials\dummy.txt +SET dummytext=This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. +ECHO %dummytext% > .\_BuildOutput\WebApp\App_Code\dummy.txt +ECHO %dummytext% > .\_BuildOutput\WebApp\App_Data\dummy.txt +ECHO %dummytext% > .\_BuildOutput\WebApp\App_Plugins\dummy.txt +ECHO %dummytext% > .\_BuildOutput\WebApp\css\dummy.txt +ECHO %dummytext% > .\_BuildOutput\WebApp\masterpages\dummy.txt +ECHO %dummytext% > .\_BuildOutput\WebApp\media\dummy.txt +ECHO %dummytext% > .\_BuildOutput\WebApp\scripts\dummy.txt +ECHO %dummytext% > .\_BuildOutput\WebApp\usercontrols\dummy.txt +ECHO %dummytext% > .\_BuildOutput\WebApp\Views\Partials\dummy.txt +ECHO %dummytext% > .\_BuildOutput\WebApp\Views\MacroPartials\dummy.txt ECHO Adding Web.config transform files to the NuGet package -ren .\_BuildOutput\WebApp\MacroScripts\Web.config Web.config.transform -ren .\_BuildOutput\WebApp\Views\Web.config Web.config.transform -ren .\_BuildOutput\WebApp\Xslt\Web.config Web.config.transform +REN .\_BuildOutput\WebApp\MacroScripts\Web.config Web.config.transform +REN .\_BuildOutput\WebApp\Views\Web.config Web.config.transform +REN .\_BuildOutput\WebApp\Xslt\Web.config Web.config.transform ECHO Packing the NuGet release files ..\src\.nuget\NuGet.exe Pack NuSpecs\UmbracoCms.Core.nuspec -Version %version% diff --git a/build/UmbracoVersion.txt b/build/UmbracoVersion.txt index cdf5fdc526..2c60a02064 100644 --- a/build/UmbracoVersion.txt +++ b/build/UmbracoVersion.txt @@ -1 +1,2 @@ +# Usage: on line 2 put the release version, on line 3 put the version comment (example: beta) 7.1.9 \ No newline at end of file