Skip to content

Conversation

@agocke
Copy link
Member

@agocke agocke commented Oct 24, 2025

Reverts #120997

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov
See info in area-owners.md if you want to be subscribed.

@agocke
Copy link
Member Author

agocke commented Oct 24, 2025

@jkoritzinsky Looks like the tests are trying to pull the host from NuGet, but I would expect the host to be part of our bootstrap. Is that correct? Or do we not yet build the host in the bootstrap?

@jkoritzinsky
Copy link
Member

It looks like we do build the host, but we don't hook up the right logic in targetingpacks.targets for the bootstrapped apphost to be found.

This target needs to be updated:

<Target Name="UpdateLocalAppHostPack"

It should do something like the target for the ref/targeting packs (use UseBootstrapLayout to determine which apphost to use):

<PropertyGroup Condition="'$(UseBootstrapLayout)' != 'true'">
<LocalRefPackDir>$(MicrosoftNetCoreAppRefPackDir)</LocalRefPackDir>
<LocalRuntimePackDir>$(MicrosoftNetCoreAppRuntimePackDir)</LocalRuntimePackDir>
</PropertyGroup>
<PropertyGroup Condition="'$(UseBootstrapLayout)' == 'true'">
<LocalRefPackDir>$(BootstrapRefPackDir)</LocalRefPackDir>
<LocalRuntimePackDir>$(BootstrapRuntimePackDir)</LocalRuntimePackDir>
</PropertyGroup>

Comment on lines 139 to 149
<PropertyGroup Condition="'$(UseBootstrapLayout)' != 'true'">
<LocalRefPackDir>$(MicrosoftNetCoreAppRefPackDir)</LocalRefPackDir>
<LocalRuntimePackDir>$(MicrosoftNetCoreAppRuntimePackDir)</LocalRuntimePackDir>
</PropertyGroup>
<PropertyGroup Condition="'$(UseBootstrapLayout)' == 'true'">
<LocalRefPackDir>$(BootstrapRefPackDir)</LocalRefPackDir>
<LocalRuntimePackDir>$(BootstrapRuntimePackDir)</LocalRuntimePackDir>
</PropertyGroup>
<PropertyGroup>
<AppHostSourcePath>$(LocalAppHostPath)</AppHostSourcePath>
<SingleFileHostSourcePath>$(LocalSingleFileHostPath)</SingleFileHostSourcePath>
Copy link
Member

Choose a reason for hiding this comment

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

I meant that we need to make sure that LocalAppHostPath is set to the bootstrapped one.

For the Host xunit tests, we should also set those projects to have UseBoootstrapLayout=true when UseBootstrap=true.

@@ -1,5 +1,7 @@
<Project>

<Import Project="$(RepositoryEngineeringDir)targetingpacks.targets" />
Copy link
Member

Choose a reason for hiding this comment

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

Do we always want the apphost tests using the live apphost, or only on bootstrap (where we don't have an LKG host)?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh is importing this target alone enough to override? I only intended to use the bootstrap apphost for platforms with no lkg

Copy link
Member

Choose a reason for hiding this comment

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

I think you need to explicitly opt out by setting UseLocalTargetingRuntimePack to false for the cases where we want to use the LKG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants