diff --git a/build.psm1 b/build.psm1 index f5808cbba35..2ba1b6b45ff 100644 --- a/build.psm1 +++ b/build.psm1 @@ -307,7 +307,8 @@ function Start-PSBuild { [ValidateNotNullOrEmpty()] [string]$ReleaseTag, [switch]$Detailed, - [switch]$InteractiveAuth + [switch]$InteractiveAuth, + [switch]$SkipRoslynAnalyzers ) if ($ReleaseTag -and $ReleaseTag -notmatch "^v\d+\.\d+\.\d+(-(preview|rc)(\.\d{1,2})?)?$") { @@ -453,6 +454,10 @@ Fix steps: $Arguments += "/property:ReleaseTag=$ReleaseTagToUse" } + if ($SkipRoslynAnalyzers) { + $Arguments += "/property:RunAnalyzersDuringBuild=false" + } + # handle Restore Restore-PSPackage -Options $Options -Force:$Restore -InteractiveAuth:$InteractiveAuth