diff --git a/build.psm1 b/build.psm1 index 0df0aba513..3af82eaa86 100644 --- a/build.psm1 +++ b/build.psm1 @@ -249,7 +249,11 @@ function Start-PSBuild { $Arguments += "--configuration", $Options.Configuration $Arguments += "--framework", $Options.Framework - $Arguments += "--runtime", $Options.Runtime + + if (-not $SMAOnly) { + # libraries should not have runtime + $Arguments += "--runtime", $Options.Runtime + } # handle Restore if ($Restore -or -not (Test-Path "$($Options.Top)/obj/project.assets.json")) {