Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the host version that corresponds with the LKG SDK #60888

Merged
merged 1 commit into from
Mar 12, 2025

Conversation

ViktorHofer
Copy link
Member

@ViktorHofer ViktorHofer commented Mar 12, 2025

Don't use the live host but the one that is also redistributed in the .NET SDK. This is a small partial revert of bac31da#diff-8df3cd354bc584349d04ad5675b33c042d8b99b741b8b95af394c55e0f5001bf

Unblocks dotnet/sdk#47480

Don't use the live host but the one that is also redistributed in the .NET SDK.

Unblocks dotnet/sdk#47480
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Mar 12, 2025
@ViktorHofer ViktorHofer requested a review from akoeplinger March 12, 2025 07:04
@@ -9,20 +9,20 @@
<HostArch Condition="'$(Platform)' == 'Win32'">x86</HostArch>
<HostArch Condition="'$(Platform)' == 'AnyCPU'">x64</HostArch>
<HostArch Condition="'$(DotNetBuild)' == 'true'">$(TargetArchitecture)</HostArch>
<LibNetHostPath>$(NuGetPackageRoot)microsoft.netcore.app.host.win-$(HostArch)\$(MicrosoftNETCoreAppRefVersion)\runtimes\win-$(HostArch)\native</LibNetHostPath>
<LibNetHostPath>$(NuGetPackageRoot)microsoft.netcore.app.host.win-$(HostArch)\$(LibNetHostAppPackVersion)\runtimes\win-$(HostArch)\native</LibNetHostPath>
<!-- This tools version MUST match the same version as runtime uses to compile libnethost.lib -->
<PlatformToolsetVersion>143</PlatformToolsetVersion>
</PropertyGroup>

<!-- Platform is different during restore than during build. Therefore, restore everything when not building the product. -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can flow this in via GenerateFiles.csproj too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean the platform that should be used at restore time?

Copy link
Member

@akoeplinger akoeplinger Mar 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes or restoring the packages in general there

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the problem that required this is that the platform negotiation happens at P2P build time. NuGet doesn't see the agreed upon Platform as it trims out P2P properties. The outer context, i.e. GenerateFiles.csproj or Tools.props wouldn't have more information than the infrastructure in this file.

@ViktorHofer ViktorHofer merged commit a03bad2 into main Mar 12, 2025
27 checks passed
@ViktorHofer ViktorHofer deleted the HostVersionLKG branch March 12, 2025 09:42
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0-preview3 milestone Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants