anchor.diff:  :: Deployment
   :: ----------
   
  -echo Custom Deployment script for combined csproj and xproj deployment.
  -
  -:: Remove wwwroot if deploying to default location
  -IF "%DEPLOYMENT_TARGET%" == "%WEBROOT_PATH%" (
  -    FOR /F %%i IN ("%DEPLOYMENT_TARGET%") DO IF "%%~nxi"=="wwwroot" (
  -    SET DEPLOYMENT_TARGET=%%~dpi
  -    )
  -)
  -
  -:: Remove trailing slash if present
  -IF "%DEPLOYMENT_TARGET:~-1%"=="\" (
  -    SET DEPLOYMENT_TARGET=%DEPLOYMENT_TARGET:~0,-1%
  -)
  -
  -::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  -:: Deployment
  -:: ----------
  -
   echo Handling ASP.NET Core Web Application deployment.
   
   :: 1. Restore nuget packages
  +echo Restoring nuget packages for csproj projects (NotificationsProcessor)
  +call :ExecuteCmd nuget.exe restore "%DEPLOYMENT_SOURCE%\AllReadyApp\NotificationsProcessor\packages.config" -SolutionDirectory "%DEPLOYMENT_SOURCE%\AllReadyApp" -source https://www.nuget.org/api/v2/
  +IF !ERRORLEVEL! NEQ 0 goto error
  +
  +echo Restoring nuget packages for all project.json projects
   call :ExecuteCmd nuget.exe restore -packagesavemode nuspec
   IF !ERRORLEVEL! NEQ 0 goto error
   
  -:: 2. Build and publish
  -:: 4. Run Our Custom build steps:
  +:: 2a. Build
  +echo Storing Git Version Info for Runtime Display
   call :ExecuteCmd PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "(Get-Content AllReadyApp\Web-App\AllReady\version.json).replace('GITVERSION', (git rev-parse --short HEAD)) | Set-Content AllReadyApp\Web-App\AllReady\version.json"
  -call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\AllReady.Models\AllReady.Models.csproj"
  -IF !ERRORLEVEL! NEQ 0 goto error
  -call dotnet build "%DEPLOYMENT_SOURCE%\wrap\AllReady.Models\project.json"
  -IF !ERRORLEVEL! NEQ 0 goto error
  -call dotnet build "%DEPLOYMENT_SOURCE%\Web-App\AllReady\project.json"
  -IF !ERRORLEVEL! NEQ 0 goto error
  -call dotnet build "%DEPLOYMENT_SOURCE%\Web-App\AllReady.UnitTest\project.json"
  -IF !ERRORLEVEL! NEQ 0 goto error
  -call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\NotificationsProcessor\NotificationsProcessor.csproj"
   
  -
  -call :ExecuteCmd dotnet publish "{PROJECT_JSON}" --output "%DEPLOYMENT_TEMP%" --configuration Release
  +echo Building AllReady.Models Project (csproj)
  +call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\AllReadyApp\AllReady.Models\AllReady.Models.csproj" /p:Configuration=Debug
   IF !ERRORLEVEL! NEQ 0 goto error
   
  -:: 4.2 Xcopy the webjobs:
  -:: Note this uses debug, and I can't find how to read the
  -:: build config.
  +echo Building AllReady.Models Project (project.json)
  +call :ExecuteCmd dotnet build "%DEPLOYMENT_SOURCE%\AllReadyApp\wrap\AllReady.Models\project.json" --configuration Debug
  +IF !ERRORLEVEL! NEQ 0 goto error
   
  -mkdir "%DEPLOYMENT_TEMP%\wwwroot\app_data\jobs\continuous\notificationsprocessor\"
  +echo Not Building AllReady Project (it gets built with publish command)
   
  -call xcopy /S "%DEPLOYMENT_SOURCE%\NotificationsProcessor\bin\debug" "%DEPLOYMENT_TEMP%\wwwroot\app_data\jobs\continuous\notificationsprocessor\"
  +echo Building NotificationsProcessor Project (csproj)
  +call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\AllReadyApp\NotificationsProcessor\NotificationsProcessor.csproj" /p:Configuration=Debug
  +IF !ERRORLEVEL! NEQ 0 goto error
  +
  +:: 2b. Publish AllReady
  +echo Publishing Allready Project (project.json) which includes building it
  +call :ExecuteCmd dotnet publish "%DEPLOYMENT_SOURCE%\AllReadyApp\Web-App\AllReady" --output "%DEPLOYMENT_TEMP%" --configuration Debug
  +IF !ERRORLEVEL! NEQ 0 goto error
  +
  +:: 2c. Publish WebJobs (NotificationsProcessor)
  +echo Publishing NotificationsProcessor WebJob
  +call :ExecuteCmd mkdir "%DEPLOYMENT_TEMP%\app_data\jobs\continuous\notificationsprocessor\"
  +call :ExecuteCmd xcopy /S "%DEPLOYMENT_SOURCE%\AllReadyApp\NotificationsProcessor\bin\debug" "%DEPLOYMENT_TEMP%\app_data\jobs\continuous\notificationsprocessor\"
   
   
   :: 3. KuduSync
  
positive.code: IF !ERRORLEVEL! NEQ 0 goto error
  
  ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  
  
  ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  
  :: Post deployment stub
  IF DEFINED POST_DEPLOYMENT_ACTION call "%POST_DEPLOYMENT_ACTION%"
  IF !ERRORLEVEL! NEQ 0 goto error
  
  goto end
  
  :: Execute command routine that will echo out when error
  
negative.code: @if "%SCM_TRACE_LEVEL%" NEQ "4" @echo off
  
  :: ----------------------
  :: KUDU Deployment Script
  :: Version: 1.0.7
  :: ----------------------
  
  :: Prerequisites
  