Browse Source

Allow BaselineGenerator to build after updating version (#26252)

- avoid problems when re-branding in a clean clone
  - attempts to build `BaselineGenerator` failed due to out-of-date baselines
Doug Bunting 5 years ago
parent
commit
c6787dd21c
1 changed files with 4 additions and 1 deletions
  1. 4 1
      eng/targets/Packaging.targets

+ 4 - 1
eng/targets/Packaging.targets

@@ -1,7 +1,10 @@
 <Project>
 
   <Target Name="EnsureBaselineIsUpdated"
-          Condition="'$(IsServicingBuild)' == 'true' AND '$(AspNetCoreBaselineVersion)' != '$(PreviousAspNetCoreReleaseVersion)'"
+          Condition=" '$(IsServicingBuild)' == 'true' AND
+              '$(AspNetCoreBaselineVersion)' != '$(PreviousAspNetCoreReleaseVersion)' AND
+              '$(MSBuildProjectName)' != 'BaselineGenerator' AND
+              '$(MSBuildProjectName)' != 'RepoTasks' "
           BeforeTargets="BeforeBuild">
     <Error Text="The package baseline ($(AspNetCoreBaselineVersion)) is out of date with the latest release of this repo ($(PreviousAspNetCoreReleaseVersion)).
                  See $(RepoRoot)eng\tools\BaselineGenerator\README.md for instructions on updating this baseline." />