diff --git a/eng/scripts/CodeCheck.ps1 b/eng/scripts/CodeCheck.ps1 index c524640f430c..a1330618f411 100644 --- a/eng/scripts/CodeCheck.ps1 +++ b/eng/scripts/CodeCheck.ps1 @@ -211,7 +211,7 @@ try { $changedAPIBaselines.Add($file) } # Check for changes in Unshipped in servicing branches - if ($targetBranch -like 'release*' -and $file -like '*PublicAPI.Unshipped.txt') { + if ($targetBranch -like 'release*' -and $targetBranch -notlike '*preview*' -and $file -like '*PublicAPI.Unshipped.txt') { $changedAPIBaselines.Add($file) } }