Skip to content

Commit e4c028b

Browse files
committed
Override stage 2 bundled versions like we used to as this is the only way the downlevel tests can work.
Still discussing any other options offline.
1 parent e1ce879 commit e4c028b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Layout/redist/targets/OverlaySdkOnLKG.targets

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,15 @@
55
<_DotNetHiveRoot>$(DOTNET_INSTALL_DIR)</_DotNetHiveRoot>
66
<_DotNetHiveRoot Condition="'$(_DotNetHiveRoot)' == ''">$(RepoRoot).dotnet/</_DotNetHiveRoot>
77
<_DotNetHiveRoot Condition="!HasTrailingSlash('$(_DotNetHiveRoot)')">$(_DotNetHiveRoot)/</_DotNetHiveRoot>
8+
<SdkOutputDirectory>$(RedistLayoutPath)sdk\$(Version)</SdkOutputDirectory>
89
</PropertyGroup>
910

11+
<!-- Get stage 0 SDK version without having to duplicate the LKG SDK property between the global.json
12+
and a property. -->
13+
<Exec Command="$(DotnetTool) --version" ConsoleToMsbuild="true">
14+
<Output TaskParameter="ConsoleOutput" PropertyName="Stage0SdkVersion"/>
15+
</Exec>
16+
1017
<!-- Copy artifacts from the stage0 SDK folder.
1118
Ignore the sdk, templates and host files for which only live built artifacts should be used. -->
1219
<ItemGroup>
@@ -24,6 +31,12 @@
2431
<InstallerOutputFile Include="@(OverlaySDKFile)" Exclude="@(InstallerOutputFile)" />
2532
</ItemGroup>
2633

34+
<OverrideAndCreateBundledNETCoreAppPackageVersion
35+
Stage0MicrosoftNETCoreAppRefPackageVersionPath="$(_DotNetHiveRoot)/sdk/$(Stage0SdkVersion)/Microsoft.NETCoreSdk.BundledVersions.props"
36+
MicrosoftNETCoreAppRefPackageVersion="$(MicrosoftNETCoreAppRefPackageVersion)"
37+
NewSDKVersion="$(Version)"
38+
OutputPath="$(TestHostDotNetRoot)/SDK/$(Version)/Microsoft.NETCoreSdk.BundledVersions.props"/>
39+
2740
<!-- Copy artifacts to the testhost folder. -->
2841
<Copy DestinationFiles="@(InstallerOutputFile)"
2942
SourceFiles="@(InstallerOutputFile->Metadata('Source'))"

0 commit comments

Comments
 (0)