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

Fix incorrect apphost being used when publishing for self-contained single-file with NoBuild=true #45159

Merged

Conversation

elinor-fung
Copy link
Member

The _GetAppHostCreationConfiguration target sets the _UseSingleFileHostForPublish property, which determines if we (re-)create the app using singlefilehost on publish. When publishing with NoBuild=true, the target was not being run, so we bundled using apphost, resulting in an app that was configured to be self-contained but did not actually have the runtime as part of itself.

This change chains the target into the computation for output paths to ensure that the target runs when publishing without building, so that the correct host is used.

See https://developercommunity.visualstudio.com/t/Single-file-self-contained-failing-after/10794374

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-ILLink untriaged Request triage from a team member labels Nov 26, 2024
@elinor-fung
Copy link
Member Author

elinor-fung commented Nov 26, 2024

Workaround for SDK 9.0.100 users from @am11 in #45060 (comment) - add to the project file:

<Target Name="_WorkaroundIncorrectAppHost" BeforeTargets="_GetComHostPaths">
  <CallTarget Targets="_GetAppHostCreationConfiguration" />
</Target>

Copy link
Member

@dsplaisted dsplaisted left a comment

Choose a reason for hiding this comment

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

Looks great, thanks a lot!

@elinor-fung
Copy link
Member Author

@dsplaisted The build analysis check is red, but only showing a known test error (the linked timeout issue). Is there something I'm missing here that is being flagged as failing / needing investigation?

@dsplaisted
Copy link
Member

Is there something I'm missing here that is being flagged as failing / needing investigation?

@elinor-fung No, we have a bunch of 9.0.2xx PRs that are failing due to this issue, which we are trying to investigate and fix. Right now I don't think 9.0.2xx changes are too urgent to merge. If we have to, we will either start merging on red or disable the CI leg that's failing.

Thanks!

@baronfel
Copy link
Member

baronfel commented Dec 3, 2024

Because this impacts source-build users pretty significantly I think we should request a backported servicing fix once this is merged.

@nagilson
Copy link
Member

nagilson commented Dec 3, 2024

Rerunning to see if that timeout goes away for now. I dont think its related to your change.

@nagilson
Copy link
Member

nagilson commented Dec 4, 2024

@marcpopMSFT I think this is pretty important and I would approve to merge on red if I had permission. We still have some time in Jan (like 2 weeks) so it's probably not necessary yet, but we should keep an eye out on this PR.

@marcpopMSFT
Copy link
Member

Failures are known issues and want to prep this for customer feedback

@marcpopMSFT marcpopMSFT merged commit c989a6e into dotnet:release/9.0.2xx Dec 10, 2024
27 of 31 checks passed
@marcpopMSFT
Copy link
Member

/backport to release/9.0.1xx

Copy link
Contributor

Started backporting to release/9.0.1xx: https://github.com/dotnet/sdk/actions/runs/12262753536

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved to merge Area-NetSDK untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants