diff --git a/build/Build.bat b/build/Build.bat
index ead7df0abc..867186ee3a 100644
--- a/build/Build.bat
+++ b/build/Build.bat
@@ -4,11 +4,46 @@ SET comment=
SET version=%release%
IF [%comment%] EQU [] (SET version=%release%) ELSE (SET version=%release%-%comment%)
+ECHO Building Umbraco %version%
ReplaceIISExpressPortNumber.exe ..\src\Umbraco.Web.UI\Umbraco.Web.UI.csproj %release%
+SET nuGetFolder=%CD%\..\src\packages\
+
+ECHO Installing Npm NuGet Package
+..\src\.nuget\NuGet.exe install Npm.js -OutputDirectory %nuGetFolder%
+
+for /f "delims=" %%A in ('dir %nuGetFolder%node.js.* /b') do set "nodePath=%nuGetFolder%%%A\"
+for /f "delims=" %%A in ('dir %nuGetFolder%npm.js.* /b') do set "npmPath=%nuGetFolder%%%A\tools\"
+
+ECHO Temporarily adding Npm and Node to path
+SET oldPath=%PATH%
+
+path=%npmPath%;%nodePath%;%PATH%
+
+SET buildFolder="%CD%"
+
+ECHO Go to Umbraco.Web.UI.Client folder
+CD ..\src\Umbraco.Web.UI.Client\
+
+ECHO Do npm install and the grunt build of Belle
+call npm install
+call npm install -g grunt-cli
+call grunt
+
+ECHO Reset path to what it was before
+path=%oldPath%
+
+ECHO Move back to the build folder
+CD %buildFolder%
+
+ECHO Installing the Microsoft.Bcl.Build package before anything else, otherwise you'd have to run build.cmd twice
+..\src\.nuget\NuGet.exe install ..\src\Umbraco.Web.UI\packages.config -OutputDirectory %nuGetFolder%
+
+ECHO Performing MSBuild and producing Umbraco binaries zip files
%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe "Build.proj" /p:BUILD_RELEASE=%release% /p:BUILD_COMMENT=%comment%
+ECHO Adding dummy files to include in the NuGet package so that empty folders actually get created
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_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
@@ -20,9 +55,11 @@ echo This file is only here so that the containing folder will be included in th
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
+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
+ECHO Packing the NuGet release files
..\src\.nuget\NuGet.exe pack NuSpecs\UmbracoCms.Core.nuspec -Version %version%
..\src\.nuget\NuGet.exe pack NuSpecs\UmbracoCms.nuspec -Version %version%
diff --git a/src/.nuget/NuGet.exe b/src/.nuget/NuGet.exe
index c296edf177..8f61340295 100644
Binary files a/src/.nuget/NuGet.exe and b/src/.nuget/NuGet.exe differ
diff --git a/src/.nuget/NuGet.targets b/src/.nuget/NuGet.targets
index 930ac95d01..6ff51f6e83 100644
--- a/src/.nuget/NuGet.targets
+++ b/src/.nuget/NuGet.targets
@@ -18,13 +18,13 @@
-
+
-
+
@@ -41,7 +41,7 @@
- $(NuGetToolsPath)\nuget.exe
+ $(NuGetToolsPath)\NuGet.exe
@(PackageSource)
"$(NuGetExePath)"
@@ -50,9 +50,14 @@
$(TargetDir.Trim('\\'))
-RequireConsent
+ -NonInteractive
+
+ "$(SolutionDir) "
+ "$(SolutionDir)"
+
- $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(RequireConsentSwitch) -solutionDir "$(SolutionDir) "
- $(NuGetCommand) pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols
+ $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)
+ $(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols
@@ -70,7 +75,6 @@
-