Skip to content

Commit a03bad2

Browse files
authored
Use the host version that corresponds with the LKG SDK (#60888)
Don't use the live host but the one that is also redistributed in the .NET SDK. Unblocks dotnet/sdk#47480
1 parent d42bdf6 commit a03bad2

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

eng/tools/GenerateFiles/Directory.Build.props.in

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<DefaultNetCoreTargetFramework>${DefaultNetCoreTargetFramework}</DefaultNetCoreTargetFramework>
44
<ArtifactsShippingPackagesDir>${ArtifactsShippingPackagesDir}</ArtifactsShippingPackagesDir>
55
<TreatWarningsAsErrors Condition="'$(BuildingInsideVisualStudio)' != 'true'">true</TreatWarningsAsErrors>
6+
<LibNetHostAppPackVersion Condition=" '$(LibNetHostAppPackVersion)' == '' ">${LibNetHostAppPackVersion}</LibNetHostAppPackVersion>
67

78
<!-- Temporarily hardcoded to true -->
89
<SuppressGenerateILCompilerExplicitPackageReferenceWarning>true</SuppressGenerateILCompilerExplicitPackageReferenceWarning>

eng/tools/GenerateFiles/GenerateFiles.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
MicrosoftNETCoreAppRefVersion=$(MicrosoftNETCoreAppRefVersion);
2626
MicrosoftNETCoreAppRuntimeVersion=$(MicrosoftNETCoreAppRuntimeVersion);
2727
MicrosoftPlaywrightCLIVersion=$(MicrosoftPlaywrightCLIVersion);
28+
LibNetHostAppPackVersion=$(BundledNETCoreAppPackageVersion);
2829
SupportedRuntimeIdentifiers=$([MSBuild]::Escape($(SupportedRuntimeIdentifiers)));
2930
ArtifactsShippingPackagesDir=$(ArtifactsShippingPackagesDir)
3031
</_TemplateProperties>

src/Servers/IIS/Directory.Build.props

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@
99
<HostArch Condition="'$(Platform)' == 'Win32'">x86</HostArch>
1010
<HostArch Condition="'$(Platform)' == 'AnyCPU'">x64</HostArch>
1111
<HostArch Condition="'$(DotNetBuild)' == 'true'">$(TargetArchitecture)</HostArch>
12-
<LibNetHostPath>$(NuGetPackageRoot)microsoft.netcore.app.host.win-$(HostArch)\$(MicrosoftNETCoreAppRefVersion)\runtimes\win-$(HostArch)\native</LibNetHostPath>
12+
<LibNetHostPath>$(NuGetPackageRoot)microsoft.netcore.app.host.win-$(HostArch)\$(LibNetHostAppPackVersion)\runtimes\win-$(HostArch)\native</LibNetHostPath>
1313
<!-- This tools version MUST match the same version as runtime uses to compile libnethost.lib -->
1414
<PlatformToolsetVersion>143</PlatformToolsetVersion>
1515
</PropertyGroup>
1616

1717
<!-- Platform is different during restore than during build. Therefore, restore everything when not building the product. -->
1818
<ItemGroup Condition="'$(MSBuildProjectExtension)' == '.vcxproj' and '$(DotNetBuild)' != 'true'">
19-
<PackageReference Include="Microsoft.NETCore.App.Host.win-x64" Version="[$(MicrosoftNETCoreAppRefVersion)]" PrivateAssets="all" ExcludeAssets="all" />
20-
<PackageReference Include="Microsoft.NETCore.App.Host.win-x86" Version="[$(MicrosoftNETCoreAppRefVersion)]" PrivateAssets="all" ExcludeAssets="all" />
21-
<PackageReference Include="Microsoft.NETCore.App.Host.win-arm64" Version="[$(MicrosoftNETCoreAppRefVersion)]" PrivateAssets="all" ExcludeAssets="all" />
19+
<PackageReference Include="Microsoft.NETCore.App.Host.win-x64" Version="[$(LibNetHostAppPackVersion)]" PrivateAssets="all" ExcludeAssets="all" />
20+
<PackageReference Include="Microsoft.NETCore.App.Host.win-x86" Version="[$(LibNetHostAppPackVersion)]" PrivateAssets="all" ExcludeAssets="all" />
21+
<PackageReference Include="Microsoft.NETCore.App.Host.win-arm64" Version="[$(LibNetHostAppPackVersion)]" PrivateAssets="all" ExcludeAssets="all" />
2222
</ItemGroup>
2323

2424
<ItemGroup Condition="'$(MSBuildProjectExtension)' == '.vcxproj' and '$(DotNetBuild)' == 'true'">
25-
<PackageReference Include="Microsoft.NETCore.App.Host.win-$(TargetArchitecture)" Version="[$(MicrosoftNETCoreAppRefVersion)]" PrivateAssets="all" ExcludeAssets="all" />
25+
<PackageReference Include="Microsoft.NETCore.App.Host.win-$(TargetArchitecture)" Version="[$(LibNetHostAppPackVersion)]" PrivateAssets="all" ExcludeAssets="all" />
2626
</ItemGroup>
2727

2828
</Project>

0 commit comments

Comments
 (0)