Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit fdd6134

Browse files
Merge pull request #2096 from github/fixes/script-nuget-2019
Use same msbuild.exe for NuGet and solution build
2 parents 865845e + 7432cd8 commit fdd6134

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/modules.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ New-Module -ScriptBlock {
115115
}
116116

117117
function Build-Solution([string]$solution, [string]$target, [string]$configuration, [switch]$ForVSInstaller, [bool]$Deploy = $false) {
118-
Run-Command -Fatal { & $nuget restore $solution -NonInteractive -Verbosity detailed }
118+
$msbuild = Find-MSBuild
119+
120+
Run-Command -Fatal { & $nuget restore $solution -NonInteractive -Verbosity detailed -MSBuildPath (Split-Path -parent $msbuild) }
119121
$flag1 = ""
120122
$flag2 = ""
121123
if ($ForVSInstaller) {
@@ -127,8 +129,6 @@ New-Module -ScriptBlock {
127129
$flag1 = "/p:Package=Skip"
128130
}
129131

130-
$msbuild = Find-MSBuild
131-
132132
Write-Host "$msbuild $solution /target:$target /property:Configuration=$configuration /p:DeployExtension=false /verbosity:minimal /p:VisualStudioVersion=15.0 /bl:output.binlog $flag1 $flag2"
133133
Run-Command -Fatal { & $msbuild $solution /target:$target /property:Configuration=$configuration /p:DeployExtension=false /verbosity:minimal /p:VisualStudioVersion=15.0 /bl:output.binlog $flag1 $flag2 }
134134
}

0 commit comments

Comments
 (0)