Skip to content

Commit b1dca37

Browse files
committed
Further fixes for running Build-Toolkit-Components.ps1 on Linux
1 parent 7b112b4 commit b1dca37

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

Build-Toolkit-Components.ps1

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,21 @@ function Invoke-MSBuildWithBinlog {
124124
)
125125

126126
# Reset build args to default
127-
$msbuildArgs = @("-r", "-m", "/p:DebugType=Portable")
127+
$msbuildArgs = @("/p:DebugType=Portable")
128+
129+
# Add "-r" parameter if not running on linux
130+
if ($($PSVersionTable.Platform) -ne "Unix") {
131+
$msbuildArgs += "-r"
132+
}
133+
# Otherwise, add "-restore" parameter
134+
else {
135+
$msbuildArgs += "-restore"
136+
}
137+
138+
# Add "-m" parameter if not running on linux
139+
if ($($PSVersionTable.Platform) -ne "Unix") {
140+
$msbuildArgs += "-m"
141+
}
128142

129143
# Add packing to the msbuild arguments if NupkgOutput is supplied
130144
if ($NupkgOutput) {

0 commit comments

Comments
 (0)