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

[release/9.0.1xx] Fix incorrect apphost being used when publishing for self-contained single-file with NoBuild=true #45400

Merged
merged 2 commits into from
Dec 13, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Dec 10, 2024

Backport of #45159 to release/9.0.1xx

/cc @marcpopMSFT @elinor-fung

Customer Impact

  • Customer reported
  • Found internally

Reported via:

Customers using the --no-build option to publish a single-file self-contained application end up with broken publish output. The published app will fail to launch. This significantly impacts source-build users.

This is due to a target used for determining configuration for apphost creation (which can occur in both build and publish) not getting chained when NoBuild=true. Publishing with --no-build ended up using the regular apphost (instead of the single-file, self-contained one), resulting in an app that was configured to be self-contained but did not actually have the runtime as part of itself.

A workaround is to either edit the app's project file to explicitly chain in a target or stop using --no-build.

Regression

  • Yes
  • No

Regression from .NET 8. Logic around configuring apphost creation used to be repeated in separate places. In .NET 9, we consolidated it into one target, but missed making sure that target was pulled in when publishing with NoBuild=true.

Testing

Manual testing with customer repro. Added automated test.

Risk

Low. The fix chains in an existing target such that it will be still be run when NoBuild=true (the --no-build option).

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-ILLink untriaged Request triage from a team member labels Dec 10, 2024
@marcpopMSFT
Copy link
Member

@elinor-fung can you add the tactics template and mark it servicing-consider when done? We'll discuss in Thursday's tactics.

@elinor-fung
Copy link
Member

Filled out template and added servicing-consider label.

@elinor-fung elinor-fung merged commit 40c57de into release/9.0.1xx Dec 13, 2024
31 checks passed
@elinor-fung elinor-fung deleted the backport/pr-45159-to-release/9.0.1xx branch December 13, 2024 03:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-NetSDK Servicing-approved untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants