Skip to content

Commit e46a50d

Browse files
Lift VMR's eng/versions.props to PSB in source only builds (#48604)
1 parent 4792e2a commit e46a50d

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/SourceBuild/content/eng/Versions.props

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,13 @@
4242
<NewtonsoftJsonVersion>13.0.3</NewtonsoftJsonVersion>
4343
<OctokitVersion>10.0.0</OctokitVersion>
4444
</PropertyGroup>
45+
46+
<PropertyGroup>
47+
<PreviouslySourceBuiltPackageVersionsPropsFile>$(PreviouslySourceBuiltPackagesPath)PackageVersions.props</PreviouslySourceBuiltPackageVersionsPropsFile>
48+
</PropertyGroup>
49+
50+
<!-- For source only builds, override the version props with previously built artifacts.
51+
If a version should be pinned, declare it after this import. -->
52+
<Import Project="$(PreviouslySourceBuiltPackageVersionsPropsFile)"
53+
Condition="Exists('$(PreviouslySourceBuiltPackageVersionsPropsFile)') and '$(DotNetBuildSourceOnly)' == 'true'"/>
4554
</Project>

src/SourceBuild/content/eng/tools/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<!-- Don't use these feeds when testing. Projects under this directory are referenced by
66
test projects. This makes sure that the feeds aren't used. -->
77
<PropertyGroup>
8-
<RestoreSources Condition="'$(DotNetBuildSourceOnly)' == 'true' and '$(Test)' != 'true'">$(PreviouslySourceBuiltReferencePackagesDir);$(PrebuiltPackagesPath);$(PreviouslySourceBuiltPackagesPath)</RestoreSources>
8+
<RestoreSources Condition="'$(DotNetBuildSourceOnly)' == 'true' and '$(Test)' != 'true'">$(PrebuiltPackagesPath);$(PreviouslySourceBuiltPackagesPath)</RestoreSources>
99
</PropertyGroup>
1010

1111
</Project>

0 commit comments

Comments
 (0)