From 3a614834703d3e4fe8b235cb3632d364283e55f8 Mon Sep 17 00:00:00 2001 From: xtqqczze <45661989+xtqqczze@users.noreply.github.com> Date: Wed, 7 Jul 2021 04:50:35 +0100 Subject: [PATCH] Add `SkipRoslynAnalyzers` parameter to `Start-PSBuild` (#15640) --- build.psm1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build.psm1 b/build.psm1 index f5808cbba3..2ba1b6b45f 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