Update libraries-packages.proj (#54150)
authorViktor Hofer <viktor.hofer@microsoft.com>
Mon, 14 Jun 2021 20:51:19 +0000 (22:51 +0200)
committerGitHub <noreply@github.com>
Mon, 14 Jun 2021 20:51:19 +0000 (22:51 +0200)
src/libraries/libraries-packages.proj

index 7c870d6..2f4d094 100644 (file)
@@ -21,8 +21,8 @@
   <!-- Need the PackageIndexFile file property from baseline.props -->
   <Import Project="$(PkgDir)baseline\baseline.props" />
 
-  <!-- Calculate PackageDownload items for restore. -->
-  <Import Project="$(RepositoryEngineeringDir)restore\harvestPackages.targets" Condition="'$(MSBuildRestoreSessionId)' != ''" />
+  <!-- Calculate PackageDownload items for restore. Skip this logic during source build to avoid pre-builts. -->
+  <Import Project="$(RepositoryEngineeringDir)restore\harvestPackages.targets" Condition="'$(MSBuildRestoreSessionId)' != '' and '$(DotNetBuildFromSource)' != 'true'" />
 
   <!--
     Updates the package index to mark all packages we are building that can go stable as stable.