Skip to content

Commit ff1d3f3

Browse files
brettfobaronfel
authored andcommitted
only install 2.1 SDK in non source build scenarios (#7703)
1 parent da0961d commit ff1d3f3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

eng/build.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ force_bootstrap=false
6060
ci=false
6161
skip_analyzers=false
6262
prepare_machine=false
63+
source_build=false
6364
properties=""
6465

6566
docker=false
@@ -131,6 +132,9 @@ while [[ $# > 0 ]]; do
131132
;;
132133
/p:*)
133134
properties="$properties $1"
135+
if [[ "$1" == "/p:dotnetbuildfromsource=true" ]]; then
136+
source_build=true
137+
fi
134138
;;
135139
*)
136140
echo "Invalid argument: $1"
@@ -277,7 +281,9 @@ function BuildSolution {
277281
InitializeDotNetCli $restore
278282

279283
# enable us to build netcoreapp2.1 binaries
280-
InstallDotNetSdk $_InitializeDotNetCli 2.1.503
284+
if [[ "$source_build" != true ]]; then
285+
InstallDotNetSdk $_InitializeDotNetCli 2.1.503
286+
fi
281287

282288
BuildSolution
283289

0 commit comments

Comments
 (0)