From cc1bb54f1a4d14ab98b55835e4dcba7760dda0b7 Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Tue, 5 Jul 2016 15:09:39 -0700 Subject: [PATCH 01/11] Removing build scripts from dotnet-cli-build. Moving the stage0 to a run_build scripts and invoking dotnet build3 build.proj for the build. --- build.cmd | 2 +- build.proj | 15 +++++++++- build.sh | 4 +-- build/Microsoft.DotNet.Cli.Compile.targets | 2 +- build/Microsoft.DotNet.Cli.Prepare.targets | 7 +---- .../build.ps1 => run_build.ps1 | 30 +++---------------- .../dotnet-cli-build/build.sh => run_build.sh | 30 +------------------ 7 files changed, 24 insertions(+), 66 deletions(-) rename build_projects/dotnet-cli-build/build.ps1 => run_build.ps1 (66%) rename build_projects/dotnet-cli-build/build.sh => run_build.sh (80%) mode change 100755 => 100644 diff --git a/build.cmd b/build.cmd index bd617d268..e72f25765 100644 --- a/build.cmd +++ b/build.cmd @@ -3,5 +3,5 @@ REM Copyright (c) .NET Foundation and contributors. All rights reserved. REM Licensed under the MIT license. See LICENSE file in the project root for full license information. -powershell -NoProfile -NoLogo -Command "%~dp0build_projects\dotnet-cli-build\build.ps1 %*; exit $LastExitCode;" +powershell -NoProfile -NoLogo -Command "%~dp0build.ps1 %*; exit $LastExitCode;" if %errorlevel% neq 0 exit /b %errorlevel% diff --git a/build.proj b/build.proj index 3935e56a4..3308804e3 100644 --- a/build.proj +++ b/build.proj @@ -30,6 +30,13 @@ 1.0.2 1.0.2 + + $(RepoRoot)/.dotnet_stage0/Windows/$(Architecture) + $(RepoRoot)/.dotnet_stage0/Darwin + $(RepoRoot)/.dotnet_stage0/Linux + .exe + + $(Stage0Path)/dotnet$(ExeExtension) @@ -48,7 +55,13 @@ Inputs="@(DotnetCliBuildFrameworkInputs)" Outputs="$(CLIBuildDll)" DependsOnTargets="MSBuildWorkaroundTarget"> - + + $(MSBuildThisFileDirectory)/build_projects/dotnet-cli-build + + + + + diff --git a/build.sh b/build.sh index ae1cde343..563e5176b 100755 --- a/build.sh +++ b/build.sh @@ -49,12 +49,12 @@ args=($temp) dockerbuild() { - BUILD_COMMAND=/opt/code/build_projects/dotnet-cli-build/build.sh $DIR/scripts/dockerrun.sh --non-interactive "$@" + BUILD_COMMAND=/opt/code/run_build.sh $DIR/scripts/dockerrun.sh --non-interactive "$@" } # Check if we need to build in docker if [ ! -z "$BUILD_IN_DOCKER" ]; then dockerbuild "${args[@]}" else - $DIR/build_projects/dotnet-cli-build/build.sh "${args[@]}" + $DIR/run_build.sh "${args[@]}" fi diff --git a/build/Microsoft.DotNet.Cli.Compile.targets b/build/Microsoft.DotNet.Cli.Compile.targets index 919c0a057..cad96f8b5 100644 --- a/build/Microsoft.DotNet.Cli.Compile.targets +++ b/build/Microsoft.DotNet.Cli.Compile.targets @@ -27,7 +27,7 @@ @(CompileStageInputs) $(Stage1Directory) $(Stage1SymbolsDirectory) - $(Stage0Path)/dotnet$(ExeExtension) + $(DotnetStage0) @(CompileStageInputs) diff --git a/build/Microsoft.DotNet.Cli.Prepare.targets b/build/Microsoft.DotNet.Cli.Prepare.targets index e4da334aa..6faaa3216 100644 --- a/build/Microsoft.DotNet.Cli.Prepare.targets +++ b/build/Microsoft.DotNet.Cli.Prepare.targets @@ -22,12 +22,7 @@ - - $(RepoRoot)/.dotnet_stage0/Windows/$(Architecture) - $(RepoRoot)/.dotnet_stage0/Darwin - $(RepoRoot)/.dotnet_stage0/Linux - .exe - + $(Stage0Path) $(RepoRoot)/artifacts/$(Rid) diff --git a/build_projects/dotnet-cli-build/build.ps1 b/run_build.ps1 similarity index 66% rename from build_projects/dotnet-cli-build/build.ps1 rename to run_build.ps1 index bbc5dde50..1a6ba2a33 100644 --- a/build_projects/dotnet-cli-build/build.ps1 +++ b/run_build.ps1 @@ -5,28 +5,24 @@ param( [string]$Configuration="Debug", - [string[]]$Targets=@("Default"), [string]$Architecture="x64", [switch]$NoPackage, - [switch]$NoRun, [switch]$Help) if($Help) { - Write-Host "Usage: .\build.ps1 [-Configuration ] [-Targets ] [-Architecture ] [-NoPackage] [-Help]" + Write-Host "Usage: .\build.ps1 [-Configuration ] [-Architecture ] [-NoPackage] [-Help]" Write-Host "" Write-Host "Options:" Write-Host " -Configuration Build the specified Configuration (Debug or Release, default: Debug)" - Write-Host " -Targets Comma separated build targets to run (Init, Compile, Publish, etc.; Default is a full build and publish)" Write-Host " -Architecture Build the specified architecture (x64 or x86 (supported only on Windows), default: x64)" Write-Host " -NoPackage Skip packaging targets" - Write-Host " -NoRun Skip running the build" Write-Host " -Help Display this help message" exit 0 } $env:CONFIGURATION = $Configuration; -$RepoRoot = "$PSScriptRoot\..\.." +$RepoRoot = "$PSScriptRoot" $env:NUGET_PACKAGES = "$RepoRoot\.nuget\packages" if($NoPackage) @@ -69,23 +65,5 @@ $env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH" # Disable first run since we want to control all package sources $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 -# Restore the build scripts -Write-Host "Restoring Build Script projects..." -pushd "$PSScriptRoot" -dotnet restore -if($LASTEXITCODE -ne 0) { throw "Failed to restore" } -popd - -# Publish the builder -Write-Host "Compiling Build Scripts..." -dotnet publish "$PSScriptRoot" -o "$PSScriptRoot\bin" --framework netcoreapp1.0 -if($LASTEXITCODE -ne 0) { throw "Failed to compile build scripts" } - -if(!$NoRun) -{ - # Run the builder - Write-Host "Invoking Build Scripts..." - Write-Host " Configuration: $env:CONFIGURATION" - & "$PSScriptRoot\bin\dotnet-cli-build.exe" @Targets - if($LASTEXITCODE -ne 0) { throw "Build failed" } -} +dotnet build3 build.proj /p:Architecture=x64 +if($LASTEXITCODE -ne 0) { throw "Failed to restore" } diff --git a/build_projects/dotnet-cli-build/build.sh b/run_build.sh old mode 100755 new mode 100644 similarity index 80% rename from build_projects/dotnet-cli-build/build.sh rename to run_build.sh index 11fee896c..5f8c1e984 --- a/build_projects/dotnet-cli-build/build.sh +++ b/run_build.sh @@ -25,16 +25,9 @@ while [[ $# > 0 ]]; do export CONFIGURATION=$2 shift ;; - --targets) - IFS=',' read -r -a targets <<< $2 - shift - ;; --nopackage) export DOTNET_BUILD_SKIP_PACKAGING=1 ;; - --norun) - export DOTNET_BUILD_SKIP_RUN=1 - ;; --skip-prereqs) # Allow CI to disable prereqs check since the CI has the pre-reqs but not ldconfig it seems export DOTNET_INSTALL_SKIP_PREREQS=1 @@ -44,10 +37,8 @@ while [[ $# > 0 ]]; do echo "" echo "Options:" echo " --configuration Build the specified Configuration (Debug or Release, default: Debug)" - echo " --targets Comma separated build targets to run (Init, Compile, Publish, etc.; Default is a full build and publish)" echo " --skip-prereqs Skip checks for pre-reqs in dotnet_install" echo " --nopackage Skip packaging targets" - echo " --norun Skip running the build" echo " --docker Build in Docker using the Dockerfile located in scripts/docker/IMAGENAME" echo " --help Display this help message" exit 0 @@ -107,23 +98,4 @@ fi # Disable first run since we want to control all package sources export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 -# Restore the build scripts -echo "Restoring Build Script projects..." -( - cd "$DIR" - dotnet restore -) - -# Build the builder -echo "Compiling Build Scripts..." -dotnet publish "$DIR" -o "$DIR/bin" --framework netcoreapp1.0 - -if [ -z "$DOTNET_BUILD_SKIP_RUN" ]; then - export PATH="$OLDPATH" - # Run the builder - echo "Invoking Build Scripts..." - echo "Configuration: $CONFIGURATION" - - $DIR/bin/dotnet-cli-build ${targets[@]} -fi -exit $? +dotnet build3 build.proj /p:Architecture=x64 \ No newline at end of file From aebb42335c44c82e8700735542f4bca048f33a79 Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Tue, 5 Jul 2016 16:28:00 -0700 Subject: [PATCH 02/11] Changed dotnet stage0 to no longer pivot on OS. We just place it under dotnet_stage0/ --- build.proj | 4 +--- .../shared-build-targets-utils/Utils/DotNetCli.cs | 14 +++----------- run_build.ps1 | 2 +- run_build.sh | 7 ++++--- 4 files changed, 9 insertions(+), 18 deletions(-) mode change 100644 => 100755 run_build.sh diff --git a/build.proj b/build.proj index 3308804e3..3e673d4f4 100644 --- a/build.proj +++ b/build.proj @@ -31,9 +31,7 @@ 1.0.2 1.0.2 - $(RepoRoot)/.dotnet_stage0/Windows/$(Architecture) - $(RepoRoot)/.dotnet_stage0/Darwin - $(RepoRoot)/.dotnet_stage0/Linux + $(RepoRoot)/.dotnet_stage0/$(Architecture) .exe $(Stage0Path)/dotnet$(ExeExtension) diff --git a/build_projects/shared-build-targets-utils/Utils/DotNetCli.cs b/build_projects/shared-build-targets-utils/Utils/DotNetCli.cs index 82762ce56..7e6451e98 100644 --- a/build_projects/shared-build-targets-utils/Utils/DotNetCli.cs +++ b/build_projects/shared-build-targets-utils/Utils/DotNetCli.cs @@ -55,17 +55,9 @@ namespace Microsoft.DotNet.Cli.Build private static string GetStage0Path() { - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - return Path.Combine(Directory.GetCurrentDirectory(), ".dotnet_stage0", - RuntimeEnvironment.OperatingSystemPlatform.ToString(), - RuntimeEnvironment.RuntimeArchitecture); - } - else - { - return Path.Combine(Directory.GetCurrentDirectory(), ".dotnet_stage0", RuntimeEnvironment.OperatingSystemPlatform.ToString()); - } - + return Path.Combine(Directory.GetCurrentDirectory(), + ".dotnet_stage0", + RuntimeEnvironment.RuntimeArchitecture); } } } diff --git a/run_build.ps1 b/run_build.ps1 index 1a6ba2a33..d11d2517b 100644 --- a/run_build.ps1 +++ b/run_build.ps1 @@ -45,7 +45,7 @@ cat "$RepoRoot\branchinfo.txt" | ForEach-Object { # Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot if (!$env:DOTNET_INSTALL_DIR) { - $env:DOTNET_INSTALL_DIR="$RepoRoot\.dotnet_stage0\Windows\$Architecture" + $env:DOTNET_INSTALL_DIR="$RepoRoot\.dotnet_stage0\$Architecture" } if (!(Test-Path $env:DOTNET_INSTALL_DIR)) diff --git a/run_build.sh b/run_build.sh old mode 100644 new mode 100755 index 5f8c1e984..bf806048b --- a/run_build.sh +++ b/run_build.sh @@ -15,7 +15,8 @@ done DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" OLDPATH="$PATH" -REPOROOT="$DIR/../.." +ARCHITECTURE="x64" +REPOROOT="$DIR" source "$REPOROOT/scripts/common/_prettyprint.sh" while [[ $# > 0 ]]; do @@ -79,7 +80,7 @@ while read line; do done < "$REPOROOT/branchinfo.txt" # Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot -[ -z "$DOTNET_INSTALL_DIR" ] && export DOTNET_INSTALL_DIR=$REPOROOT/.dotnet_stage0/$(uname) +[ -z "$DOTNET_INSTALL_DIR" ] && export DOTNET_INSTALL_DIR=$REPOROOT/.dotnet_stage0/$ARCHITECTURE [ -d "$DOTNET_INSTALL_DIR" ] || mkdir -p $DOTNET_INSTALL_DIR $REPOROOT/scripts/obtain/dotnet-install.sh --channel $CHANNEL --verbose @@ -98,4 +99,4 @@ fi # Disable first run since we want to control all package sources export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 -dotnet build3 build.proj /p:Architecture=x64 \ No newline at end of file +dotnet build3 build.proj /p:Architecture=$ARCHITECTURE \ No newline at end of file From c87652f8a0279fdb620ddcc1ba0c201ba53d2a7b Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Tue, 5 Jul 2016 16:56:05 -0700 Subject: [PATCH 03/11] Fixing build.cmd to invoke run_build.ps1. I forgot to update it before. --- build.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.cmd b/build.cmd index e72f25765..9ec40245a 100644 --- a/build.cmd +++ b/build.cmd @@ -3,5 +3,5 @@ REM Copyright (c) .NET Foundation and contributors. All rights reserved. REM Licensed under the MIT license. See LICENSE file in the project root for full license information. -powershell -NoProfile -NoLogo -Command "%~dp0build.ps1 %*; exit $LastExitCode;" +powershell -NoProfile -NoLogo -Command "%~dp0run_build.ps1 %*; exit $LastExitCode;" if %errorlevel% neq 0 exit /b %errorlevel% From cdddc2e432e6150228379cae00a49693c58faebb Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Wed, 6 Jul 2016 12:03:16 -0700 Subject: [PATCH 04/11] Addressing code review comments. Fixing issue with compile where we were not copying the msbuild files to the right place. Fixed an issue where we were trying to download installers for OSes that don't have installers. Added init-tools scripts. --- build.cmd | 2 +- build.proj | 3 - build.sh | 4 +- build/Microsoft.DotNet.Cli.Compile.targets | 16 +++--- build/Microsoft.DotNet.Cli.Prepare.targets | 6 +- .../update-dependencies.ps1 | 2 +- init-tools.ps1 | 35 ++++++++++++ run_build.sh => init-tools.sh | 42 +------------- run_build.ps1 => run-build.ps1 | 36 ++---------- run-build.sh | 57 +++++++++++++++++++ 10 files changed, 113 insertions(+), 90 deletions(-) create mode 100644 init-tools.ps1 rename run_build.sh => init-tools.sh (58%) mode change 100755 => 100644 rename run_build.ps1 => run-build.ps1 (50%) create mode 100644 run-build.sh diff --git a/build.cmd b/build.cmd index 9ec40245a..cbf5108a7 100644 --- a/build.cmd +++ b/build.cmd @@ -3,5 +3,5 @@ REM Copyright (c) .NET Foundation and contributors. All rights reserved. REM Licensed under the MIT license. See LICENSE file in the project root for full license information. -powershell -NoProfile -NoLogo -Command "%~dp0run_build.ps1 %*; exit $LastExitCode;" +powershell -NoProfile -NoLogo -Command "%~dp0run-build.ps1 %*; exit $LastExitCode;" if %errorlevel% neq 0 exit /b %errorlevel% diff --git a/build.proj b/build.proj index 3e673d4f4..314ba3bdd 100644 --- a/build.proj +++ b/build.proj @@ -12,9 +12,6 @@ .ps1 .sh - -NoRun - --norun - Prepare;Compile;Test;Package;Publish $(MSBuildThisFileDirectory)/build_projects/dotnet-cli-build/bin/dotnet-cli-build $(CLIBuildFileName).dll diff --git a/build.sh b/build.sh index 563e5176b..2c9737f7f 100755 --- a/build.sh +++ b/build.sh @@ -49,12 +49,12 @@ args=($temp) dockerbuild() { - BUILD_COMMAND=/opt/code/run_build.sh $DIR/scripts/dockerrun.sh --non-interactive "$@" + BUILD_COMMAND=/opt/code/run-build.sh $DIR/scripts/dockerrun.sh --non-interactive "$@" } # Check if we need to build in docker if [ ! -z "$BUILD_IN_DOCKER" ]; then dockerbuild "${args[@]}" else - $DIR/run_build.sh "${args[@]}" + $DIR/run-build.sh "${args[@]}" fi diff --git a/build/Microsoft.DotNet.Cli.Compile.targets b/build/Microsoft.DotNet.Cli.Compile.targets index cad96f8b5..15cdbfbca 100644 --- a/build/Microsoft.DotNet.Cli.Compile.targets +++ b/build/Microsoft.DotNet.Cli.Compile.targets @@ -72,12 +72,6 @@ - - - - - - @@ -155,8 +149,16 @@ Lines="$(CommitHash);$(SdkVersion)" Overwrite="true" /> + + + + + + + + + DestinationFiles="@(MSBuildTargetsToCopy->'$(SdkOutputDirectory)\%(Filename)%(Extension)')" /> diff --git a/build/Microsoft.DotNet.Cli.Prepare.targets b/build/Microsoft.DotNet.Cli.Prepare.targets index 6faaa3216..482997252 100644 --- a/build/Microsoft.DotNet.Cli.Prepare.targets +++ b/build/Microsoft.DotNet.Cli.Prepare.targets @@ -126,21 +126,21 @@ <_DownloadAndExtractItem Include="DownloadedSharedFrameworkInstallerFile" - Condition="!Exists('$(DownloadedSharedFrameworkInstallerFile)')"> + Condition="!Exists('$(DownloadedSharedFrameworkInstallerFile)') And '$(InstallerExtension)' != ''"> $(CoreSetupInstallerBlobRootUrl)/$(SharedFrameworkVersion)/$(DownloadedSharedFrameworkInstallerFileName) $(DownloadedSharedFrameworkInstallerFile) <_DownloadAndExtractItem Include="DownloadedSharedHostInstallerFile" - Condition="!Exists('$(DownloadedSharedHostInstallerFile)')"> + Condition="!Exists('$(DownloadedSharedHostInstallerFile)') And '$(InstallerExtension)' != ''"> $(CoreSetupInstallerBlobRootUrl)/$(SharedHostVersion)/$(DownloadedSharedHostInstallerFileName) $(DownloadedSharedHostInstallerFile) <_DownloadAndExtractItem Include="DownloadedHostFxrInstallerFile" - Condition="!Exists('$(DownloadedHostFxrInstallerFile)')"> + Condition="!Exists('$(DownloadedHostFxrInstallerFile)') And '$(InstallerExtension)' != ''"> $(CoreSetupInstallerBlobRootUrl)/$(HostFxrVersion)/$(DownloadedHostFxrInstallerFileName) $(DownloadedHostFxrInstallerFile) diff --git a/build_projects/update-dependencies/update-dependencies.ps1 b/build_projects/update-dependencies/update-dependencies.ps1 index 4ecef6840..319f10f62 100644 --- a/build_projects/update-dependencies/update-dependencies.ps1 +++ b/build_projects/update-dependencies/update-dependencies.ps1 @@ -25,7 +25,7 @@ $AppPath = "$PSScriptRoot" # Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot if (!$env:DOTNET_INSTALL_DIR) { - $env:DOTNET_INSTALL_DIR="$RepoRoot\.dotnet_stage0\Windows\$Architecture" + $env:DOTNET_INSTALL_DIR="$RepoRoot\.dotnet_stage0\$Architecture" } # Install a stage 0 diff --git a/init-tools.ps1 b/init-tools.ps1 new file mode 100644 index 000000000..248e458d7 --- /dev/null +++ b/init-tools.ps1 @@ -0,0 +1,35 @@ +# +# Copyright (c) .NET Foundation and contributors. All rights reserved. +# Licensed under the MIT license. See LICENSE file in the project root for full license information. +# + +# Load Branch Info +cat "$RepoRoot\branchinfo.txt" | ForEach-Object { + if(!$_.StartsWith("#") -and ![String]::IsNullOrWhiteSpace($_)) { + $splat = $_.Split([char[]]@("="), 2) + Set-Content "env:\$($splat[0])" -Value $splat[1] + } +} + +# Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot +if (!$env:DOTNET_INSTALL_DIR) +{ + $env:DOTNET_INSTALL_DIR="$RepoRoot\.dotnet_stage0\$Architecture" +} + +if (!(Test-Path $env:DOTNET_INSTALL_DIR)) +{ + mkdir $env:DOTNET_INSTALL_DIR | Out-Null +} + +# Install a stage 0 +Write-Host "Installing .NET Core CLI Stage 0 from branchinfo channel" + +& "$RepoRoot\scripts\obtain\dotnet-install.ps1" -Channel $env:CHANNEL -Architecture $Architecture -Verbose +if($LASTEXITCODE -ne 0) { throw "Failed to install stage0" } + +# Put the stage0 on the path +$env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH" + +# Disable first run since we want to control all package sources +$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 \ No newline at end of file diff --git a/run_build.sh b/init-tools.sh old mode 100755 new mode 100644 similarity index 58% rename from run_build.sh rename to init-tools.sh index bf806048b..eaea093c7 --- a/run_build.sh +++ b/init-tools.sh @@ -13,44 +13,6 @@ while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli [[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located done DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" -OLDPATH="$PATH" - -ARCHITECTURE="x64" -REPOROOT="$DIR" -source "$REPOROOT/scripts/common/_prettyprint.sh" - -while [[ $# > 0 ]]; do - lowerI="$(echo $1 | awk '{print tolower($0)}')" - case $lowerI in - -c|--configuration) - export CONFIGURATION=$2 - shift - ;; - --nopackage) - export DOTNET_BUILD_SKIP_PACKAGING=1 - ;; - --skip-prereqs) - # Allow CI to disable prereqs check since the CI has the pre-reqs but not ldconfig it seems - export DOTNET_INSTALL_SKIP_PREREQS=1 - ;; - --help) - echo "Usage: $0 [--configuration ] [--targets ] [--skip-prereqs] [--nopackage] [--docker ] [--help]" - echo "" - echo "Options:" - echo " --configuration Build the specified Configuration (Debug or Release, default: Debug)" - echo " --skip-prereqs Skip checks for pre-reqs in dotnet_install" - echo " --nopackage Skip packaging targets" - echo " --docker Build in Docker using the Dockerfile located in scripts/docker/IMAGENAME" - echo " --help Display this help message" - exit 0 - ;; - *) - break - ;; - esac - - shift -done # Set nuget package cache under the repo export NUGET_PACKAGES="$REPOROOT/.nuget/packages" @@ -97,6 +59,4 @@ then fi # Disable first run since we want to control all package sources -export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 - -dotnet build3 build.proj /p:Architecture=$ARCHITECTURE \ No newline at end of file +export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 \ No newline at end of file diff --git a/run_build.ps1 b/run-build.ps1 similarity index 50% rename from run_build.ps1 rename to run-build.ps1 index d11d2517b..37071fde4 100644 --- a/run_build.ps1 +++ b/run-build.ps1 @@ -34,36 +34,8 @@ else $env:DOTNET_BUILD_SKIP_PACKAGING=0 } -# Load Branch Info -cat "$RepoRoot\branchinfo.txt" | ForEach-Object { - if(!$_.StartsWith("#") -and ![String]::IsNullOrWhiteSpace($_)) { - $splat = $_.Split([char[]]@("="), 2) - Set-Content "env:\$($splat[0])" -Value $splat[1] - } -} +& "$RepoRoot\init-tools.ps1" +if($LASTEXITCODE -ne 0) { throw "Failed to install Init Tools" } -# Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot -if (!$env:DOTNET_INSTALL_DIR) -{ - $env:DOTNET_INSTALL_DIR="$RepoRoot\.dotnet_stage0\$Architecture" -} - -if (!(Test-Path $env:DOTNET_INSTALL_DIR)) -{ - mkdir $env:DOTNET_INSTALL_DIR | Out-Null -} - -# Install a stage 0 -Write-Host "Installing .NET Core CLI Stage 0 from branchinfo channel" - -& "$RepoRoot\scripts\obtain\dotnet-install.ps1" -Channel $env:CHANNEL -Architecture $Architecture -Verbose -if($LASTEXITCODE -ne 0) { throw "Failed to install stage0" } - -# Put the stage0 on the path -$env:PATH = "$env:DOTNET_INSTALL_DIR;$env:PATH" - -# Disable first run since we want to control all package sources -$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 - -dotnet build3 build.proj /p:Architecture=x64 -if($LASTEXITCODE -ne 0) { throw "Failed to restore" } +dotnet build3 build.proj /p:Architecture=$Architecture +if($LASTEXITCODE -ne 0) { throw "Failed to build" } diff --git a/run-build.sh b/run-build.sh new file mode 100644 index 000000000..29d33df23 --- /dev/null +++ b/run-build.sh @@ -0,0 +1,57 @@ +#!/usr/bin/env bash +# +# Copyright (c) .NET Foundation and contributors. All rights reserved. +# Licensed under the MIT license. See LICENSE file in the project root for full license information. +# + +set -e + +SOURCE="${BASH_SOURCE[0]}" +while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink + DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" + SOURCE="$(readlink "$SOURCE")" + [[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located +done +DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" +OLDPATH="$PATH" + +ARCHITECTURE="x64" +REPOROOT="$DIR" +source "$REPOROOT/scripts/common/_prettyprint.sh" + +while [[ $# > 0 ]]; do + lowerI="$(echo $1 | awk '{print tolower($0)}')" + case $lowerI in + -c|--configuration) + export CONFIGURATION=$2 + shift + ;; + --nopackage) + export DOTNET_BUILD_SKIP_PACKAGING=1 + ;; + --skip-prereqs) + # Allow CI to disable prereqs check since the CI has the pre-reqs but not ldconfig it seems + export DOTNET_INSTALL_SKIP_PREREQS=1 + ;; + --help) + echo "Usage: $0 [--configuration ] [--targets ] [--skip-prereqs] [--nopackage] [--docker ] [--help]" + echo "" + echo "Options:" + echo " --configuration Build the specified Configuration (Debug or Release, default: Debug)" + echo " --skip-prereqs Skip checks for pre-reqs in dotnet_install" + echo " --nopackage Skip packaging targets" + echo " --docker Build in Docker using the Dockerfile located in scripts/docker/IMAGENAME" + echo " --help Display this help message" + exit 0 + ;; + *) + break + ;; + esac + + shift +done + +$REPOROOT/init-tools.sh + +dotnet build3 build.proj /p:Architecture=$ARCHITECTURE \ No newline at end of file From 889f4c3ec8b2bafa1837e0040a312b54804fae91 Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Wed, 6 Jul 2016 12:04:59 -0700 Subject: [PATCH 05/11] Fixing permissions for init-tools.sh and run-build.sh. --- init-tools.sh | 0 run-build.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 init-tools.sh mode change 100644 => 100755 run-build.sh diff --git a/init-tools.sh b/init-tools.sh old mode 100644 new mode 100755 diff --git a/run-build.sh b/run-build.sh old mode 100644 new mode 100755 From 7e71a0217acf23fefcd8c84800d9673bfe4872a2 Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Wed, 6 Jul 2016 12:32:38 -0700 Subject: [PATCH 06/11] Moving a bunch of code from init-tools to run-build.sh because of how exporting works in chained bash scripts. Something down in the tree does not flow back up. --- init-tools.sh | 41 ++--------------------------------------- run-build.sh | 39 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/init-tools.sh b/init-tools.sh index eaea093c7..9d86b3cf6 100755 --- a/init-tools.sh +++ b/init-tools.sh @@ -14,49 +14,12 @@ while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli done DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" -# Set nuget package cache under the repo -export NUGET_PACKAGES="$REPOROOT/.nuget/packages" - -# Set up the environment to be used for building with clang. -if which "clang-3.5" > /dev/null 2>&1; then - export CC="$(which clang-3.5)" - export CXX="$(which clang++-3.5)" -elif which "clang-3.6" > /dev/null 2>&1; then - export CC="$(which clang-3.6)" - export CXX="$(which clang++-3.6)" -elif which clang > /dev/null 2>&1; then - export CC="$(which clang)" - export CXX="$(which clang++)" -else - error "Unable to find Clang Compiler" - error "Install clang-3.5 or clang3.6" - exit 1 -fi - # Load Branch Info while read line; do if [[ $line != \#* ]]; then IFS='=' read -ra splat <<< "$line" export ${splat[0]}="${splat[1]}" fi -done < "$REPOROOT/branchinfo.txt" +done < "$DIR/branchinfo.txt" -# Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot -[ -z "$DOTNET_INSTALL_DIR" ] && export DOTNET_INSTALL_DIR=$REPOROOT/.dotnet_stage0/$ARCHITECTURE -[ -d "$DOTNET_INSTALL_DIR" ] || mkdir -p $DOTNET_INSTALL_DIR - -$REPOROOT/scripts/obtain/dotnet-install.sh --channel $CHANNEL --verbose - -# Put stage 0 on the PATH (for this shell only) -PATH="$DOTNET_INSTALL_DIR:$PATH" - -# Increases the file descriptors limit for this bash. It prevents an issue we were hitting during restore -FILE_DESCRIPTOR_LIMIT=$( ulimit -n ) -if [ $FILE_DESCRIPTOR_LIMIT -lt 1024 ] -then - echo "Increasing file description limit to 1024" - ulimit -n 1024 -fi - -# Disable first run since we want to control all package sources -export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 \ No newline at end of file +$DIR/scripts/obtain/dotnet-install.sh --channel $CHANNEL --verbose \ No newline at end of file diff --git a/run-build.sh b/run-build.sh index 29d33df23..d956bc685 100755 --- a/run-build.sh +++ b/run-build.sh @@ -13,12 +13,15 @@ while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli [[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located done DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" +REPOROOT="$DIR" OLDPATH="$PATH" ARCHITECTURE="x64" -REPOROOT="$DIR" source "$REPOROOT/scripts/common/_prettyprint.sh" +# Set nuget package cache under the repo +export NUGET_PACKAGES="$REPOROOT/.nuget/packages" + while [[ $# > 0 ]]; do lowerI="$(echo $1 | awk '{print tolower($0)}')" case $lowerI in @@ -52,6 +55,40 @@ while [[ $# > 0 ]]; do shift done +# Set up the environment to be used for building with clang. +if which "clang-3.5" > /dev/null 2>&1; then + export CC="$(which clang-3.5)" + export CXX="$(which clang++-3.5)" +elif which "clang-3.6" > /dev/null 2>&1; then + export CC="$(which clang-3.6)" + export CXX="$(which clang++-3.6)" +elif which clang > /dev/null 2>&1; then + export CC="$(which clang)" + export CXX="$(which clang++)" +else + error "Unable to find Clang Compiler" + error "Install clang-3.5 or clang3.6" + exit 1 +fi + +# Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot +[ -z "$DOTNET_INSTALL_DIR" ] && export DOTNET_INSTALL_DIR=$REPOROOT/.dotnet_stage0/$ARCHITECTURE +[ -d "$DOTNET_INSTALL_DIR" ] || mkdir -p $DOTNET_INSTALL_DIR + $REPOROOT/init-tools.sh +# Put stage 0 on the PATH (for this shell only) +PATH="$DOTNET_INSTALL_DIR:$PATH" + +# Increases the file descriptors limit for this bash. It prevents an issue we were hitting during restore +FILE_DESCRIPTOR_LIMIT=$( ulimit -n ) +if [ $FILE_DESCRIPTOR_LIMIT -lt 1024 ] +then + echo "Increasing file description limit to 1024" + ulimit -n 1024 +fi + +# Disable first run since we want to control all package sources +export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 + dotnet build3 build.proj /p:Architecture=$ARCHITECTURE \ No newline at end of file From f400160a097bf940ddf9e5c345818f0c656f45d2 Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Wed, 6 Jul 2016 13:35:34 -0700 Subject: [PATCH 07/11] Trying to fix the ubuntu package generation break. I believe it happened because we were loading branchinfo in the init-tools, which means that the env variables defined there were not applied to commands ran from run-build.sh. --- init-tools.sh | 8 -------- run-build.sh | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/init-tools.sh b/init-tools.sh index 9d86b3cf6..446c4eb85 100755 --- a/init-tools.sh +++ b/init-tools.sh @@ -14,12 +14,4 @@ while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli done DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" -# Load Branch Info -while read line; do - if [[ $line != \#* ]]; then - IFS='=' read -ra splat <<< "$line" - export ${splat[0]}="${splat[1]}" - fi -done < "$DIR/branchinfo.txt" - $DIR/scripts/obtain/dotnet-install.sh --channel $CHANNEL --verbose \ No newline at end of file diff --git a/run-build.sh b/run-build.sh index d956bc685..8a4de9e58 100755 --- a/run-build.sh +++ b/run-build.sh @@ -71,6 +71,14 @@ else exit 1 fi +# Load Branch Info +while read line; do + if [[ $line != \#* ]]; then + IFS='=' read -ra splat <<< "$line" + export ${splat[0]}="${splat[1]}" + fi +done < "$REPOROOT/branchinfo.txt" + # Use a repo-local install directory (but not the artifacts directory because that gets cleaned a lot [ -z "$DOTNET_INSTALL_DIR" ] && export DOTNET_INSTALL_DIR=$REPOROOT/.dotnet_stage0/$ARCHITECTURE [ -d "$DOTNET_INSTALL_DIR" ] || mkdir -p $DOTNET_INSTALL_DIR From 4510d9803cf375dd66109d6e49db2615fd75c407 Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Wed, 6 Jul 2016 13:46:54 -0700 Subject: [PATCH 08/11] Fixing the path for msbuild targets. --- build/Microsoft.DotNet.Cli.Compile.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/Microsoft.DotNet.Cli.Compile.targets b/build/Microsoft.DotNet.Cli.Compile.targets index 15cdbfbca..62ccbfe11 100644 --- a/build/Microsoft.DotNet.Cli.Compile.targets +++ b/build/Microsoft.DotNet.Cli.Compile.targets @@ -158,7 +158,7 @@ + DestinationFiles="@(MSBuildTargetsToCopy->'$(SdkOutputDirectory)\%(RecursiveDir)%(Filename)%(Extension)')" /> From 8eb05a4deb0f735fd570dc2e12f27432b5cbba13 Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Wed, 6 Jul 2016 14:45:07 -0700 Subject: [PATCH 09/11] Addressing code review comments and fixing another issue with deb installer generation. --- .../Microsoft.DotNet.Cli.Installer.DEB.targets | 4 ++++ init-tools.ps1 | 5 +++++ run-build.ps1 | 2 +- run-build.sh | 16 ---------------- 4 files changed, 10 insertions(+), 17 deletions(-) diff --git a/build/package/Microsoft.DotNet.Cli.Installer.DEB.targets b/build/package/Microsoft.DotNet.Cli.Installer.DEB.targets index 13bf3b7df..78e1536a2 100644 --- a/build/package/Microsoft.DotNet.Cli.Installer.DEB.targets +++ b/build/package/Microsoft.DotNet.Cli.Installer.DEB.targets @@ -3,6 +3,10 @@ + + $(LayoutDirectory)/$(ArtifactNameSdk)/sdk + + diff --git a/init-tools.ps1 b/init-tools.ps1 index 248e458d7..250505650 100644 --- a/init-tools.ps1 +++ b/init-tools.ps1 @@ -3,6 +3,11 @@ # Licensed under the MIT license. See LICENSE file in the project root for full license information. # +param( + [string]$Architecture="x64") + +$RepoRoot = "$PSScriptRoot" + # Load Branch Info cat "$RepoRoot\branchinfo.txt" | ForEach-Object { if(!$_.StartsWith("#") -and ![String]::IsNullOrWhiteSpace($_)) { diff --git a/run-build.ps1 b/run-build.ps1 index 37071fde4..07a620c3c 100644 --- a/run-build.ps1 +++ b/run-build.ps1 @@ -34,7 +34,7 @@ else $env:DOTNET_BUILD_SKIP_PACKAGING=0 } -& "$RepoRoot\init-tools.ps1" +& "$RepoRoot\init-tools.ps1" -Architecture $Architecture if($LASTEXITCODE -ne 0) { throw "Failed to install Init Tools" } dotnet build3 build.proj /p:Architecture=$Architecture diff --git a/run-build.sh b/run-build.sh index 8a4de9e58..d7e5cd3bf 100755 --- a/run-build.sh +++ b/run-build.sh @@ -55,22 +55,6 @@ while [[ $# > 0 ]]; do shift done -# Set up the environment to be used for building with clang. -if which "clang-3.5" > /dev/null 2>&1; then - export CC="$(which clang-3.5)" - export CXX="$(which clang++-3.5)" -elif which "clang-3.6" > /dev/null 2>&1; then - export CC="$(which clang-3.6)" - export CXX="$(which clang++-3.6)" -elif which clang > /dev/null 2>&1; then - export CC="$(which clang)" - export CXX="$(which clang++)" -else - error "Unable to find Clang Compiler" - error "Install clang-3.5 or clang3.6" - exit 1 -fi - # Load Branch Info while read line; do if [[ $line != \#* ]]; then From 5d40e8b734e8726eff19456c76c1f37c88b78e10 Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Wed, 6 Jul 2016 16:45:41 -0700 Subject: [PATCH 10/11] Fixing Ubuntu packaging issue, part 99 of hopefully 99. --- .../Microsoft.DotNet.Cli.Installer.DEB.targets | 7 +------ build_projects/dotnet-cli-build/DebTargets.cs | 11 +++++++---- build_projects/dotnet-cli-build/InstallerTargets.cs | 7 ++++++- run-build.sh | 12 +++++++++++- 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/build/package/Microsoft.DotNet.Cli.Installer.DEB.targets b/build/package/Microsoft.DotNet.Cli.Installer.DEB.targets index 78e1536a2..0bcba8086 100644 --- a/build/package/Microsoft.DotNet.Cli.Installer.DEB.targets +++ b/build/package/Microsoft.DotNet.Cli.Installer.DEB.targets @@ -3,12 +3,7 @@ - - $(LayoutDirectory)/$(ArtifactNameSdk)/sdk - - - + - diff --git a/build_projects/dotnet-cli-build/DebTargets.cs b/build_projects/dotnet-cli-build/DebTargets.cs index cf5435cf8..b55a1a260 100644 --- a/build_projects/dotnet-cli-build/DebTargets.cs +++ b/build_projects/dotnet-cli-build/DebTargets.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.IO; using System.IO.Compression; using System.Runtime.InteropServices; +using Microsoft.Build.Framework; using Microsoft.DotNet.Cli.Build.Framework; using Microsoft.DotNet.InternalAbstractions; @@ -13,6 +14,9 @@ namespace Microsoft.DotNet.Cli.Build { public class DebTargets : Task { + [Required] + public string CLISDKRoot { get; set; } + public override bool Execute() { BuildContext context = new BuildSetup("MSBuild").UseAllTargetsFromAssembly().CreateBuildContext(); @@ -21,7 +25,7 @@ namespace Microsoft.DotNet.Cli.Build return GenerateDebs(c).Success; } - public static BuildTargetResult GenerateDebs(BuildTargetContext c) + public BuildTargetResult GenerateDebs(BuildTargetContext c) { if (CurrentPlatform.IsPlatform(BuildPlatform.Ubuntu)) { @@ -32,7 +36,7 @@ namespace Microsoft.DotNet.Cli.Build return c.Success(); } - public static BuildTargetResult GenerateSdkDeb(BuildTargetContext c) + public BuildTargetResult GenerateSdkDeb(BuildTargetContext c) { if (CurrentPlatform.IsPlatform(BuildPlatform.Ubuntu)) { @@ -53,7 +57,6 @@ namespace Microsoft.DotNet.Cli.Build var debFile = c.BuildContext.Get("SdkInstallerFile"); var manPagesDir = Path.Combine(Dirs.RepoRoot, "Documentation", "manpages"); var previousVersionURL = $"https://dotnetcli.blob.core.windows.net/dotnet/{channel}/Installers/Latest/dotnet-ubuntu-x64.latest.deb"; - var sdkPublishRoot = c.BuildContext.Get("CLISDKRoot"); var sharedFxDebianPackageName = Monikers.GetDebianSharedFrameworkPackageName(CliDependencyVersions.SharedFrameworkVersion); var objRoot = Path.Combine(Dirs.Output, "obj", "debian", "sdk"); @@ -67,7 +70,7 @@ namespace Microsoft.DotNet.Cli.Build Cmd(Path.Combine(Dirs.RepoRoot, "scripts", "package", "package-debian.sh"), "-v", version, - "-i", sdkPublishRoot, + "-i", CLISDKRoot, "-o", debFile, "-p", packageName, "-b", Monikers.CLISdkBrandName, diff --git a/build_projects/dotnet-cli-build/InstallerTargets.cs b/build_projects/dotnet-cli-build/InstallerTargets.cs index fd1acdc80..42f928ea9 100644 --- a/build_projects/dotnet-cli-build/InstallerTargets.cs +++ b/build_projects/dotnet-cli-build/InstallerTargets.cs @@ -6,9 +6,14 @@ namespace Microsoft.DotNet.Cli.Build { public static BuildTargetResult GenerateInstaller(BuildTargetContext c) { + var debTargets = new DebTargets + { + CLISDKRoot = c.BuildContext.Get("CLISDKRoot") + }; + MsiTargets.GenerateMsisAndBundles(c); PkgTargets.GeneratePkgs(c); - DebTargets.GenerateDebs(c); + debTargets.GenerateDebs(c); return c.Success(); } diff --git a/run-build.sh b/run-build.sh index d7e5cd3bf..17a6a8089 100755 --- a/run-build.sh +++ b/run-build.sh @@ -22,19 +22,24 @@ source "$REPOROOT/scripts/common/_prettyprint.sh" # Set nuget package cache under the repo export NUGET_PACKAGES="$REPOROOT/.nuget/packages" +args=( "$0" ) while [[ $# > 0 ]]; do lowerI="$(echo $1 | awk '{print tolower($0)}')" case $lowerI in -c|--configuration) export CONFIGURATION=$2 + args=( "${args[@]/$1}" ) + args=( "${args[@]/$2}" ) shift ;; --nopackage) export DOTNET_BUILD_SKIP_PACKAGING=1 + args=( "${args[@]/$1}" ) ;; --skip-prereqs) # Allow CI to disable prereqs check since the CI has the pre-reqs but not ldconfig it seems export DOTNET_INSTALL_SKIP_PREREQS=1 + args=( "${args[@]/$1}" ) ;; --help) echo "Usage: $0 [--configuration ] [--targets ] [--skip-prereqs] [--nopackage] [--docker ] [--help]" @@ -55,6 +60,11 @@ while [[ $# > 0 ]]; do shift done +# $args array may have empty elements in it. +# The easiest way to remove them is to cast to string and back to array. +temp="${args[@]}" +args=($temp) + # Load Branch Info while read line; do if [[ $line != \#* ]]; then @@ -83,4 +93,4 @@ fi # Disable first run since we want to control all package sources export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 -dotnet build3 build.proj /p:Architecture=$ARCHITECTURE \ No newline at end of file +dotnet build3 build.proj /p:Architecture=$ARCHITECTURE "${args[@]}" \ No newline at end of file From ffe995fbab0b462b532de2ffc39a4f2e1edf59db Mon Sep 17 00:00:00 2001 From: Livar Cunha Date: Wed, 6 Jul 2016 16:52:58 -0700 Subject: [PATCH 11/11] Reverting the change to run-build.sh to handle additional parameters. I don't want to hold this PR for that work. having CI running is more important. --- run-build.sh | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/run-build.sh b/run-build.sh index 17a6a8089..d7e5cd3bf 100755 --- a/run-build.sh +++ b/run-build.sh @@ -22,24 +22,19 @@ source "$REPOROOT/scripts/common/_prettyprint.sh" # Set nuget package cache under the repo export NUGET_PACKAGES="$REPOROOT/.nuget/packages" -args=( "$0" ) while [[ $# > 0 ]]; do lowerI="$(echo $1 | awk '{print tolower($0)}')" case $lowerI in -c|--configuration) export CONFIGURATION=$2 - args=( "${args[@]/$1}" ) - args=( "${args[@]/$2}" ) shift ;; --nopackage) export DOTNET_BUILD_SKIP_PACKAGING=1 - args=( "${args[@]/$1}" ) ;; --skip-prereqs) # Allow CI to disable prereqs check since the CI has the pre-reqs but not ldconfig it seems export DOTNET_INSTALL_SKIP_PREREQS=1 - args=( "${args[@]/$1}" ) ;; --help) echo "Usage: $0 [--configuration ] [--targets ] [--skip-prereqs] [--nopackage] [--docker ] [--help]" @@ -60,11 +55,6 @@ while [[ $# > 0 ]]; do shift done -# $args array may have empty elements in it. -# The easiest way to remove them is to cast to string and back to array. -temp="${args[@]}" -args=($temp) - # Load Branch Info while read line; do if [[ $line != \#* ]]; then @@ -93,4 +83,4 @@ fi # Disable first run since we want to control all package sources export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 -dotnet build3 build.proj /p:Architecture=$ARCHITECTURE "${args[@]}" \ No newline at end of file +dotnet build3 build.proj /p:Architecture=$ARCHITECTURE \ No newline at end of file