Handle Linux osx-arm64 dotnet tool publish without app host#606
Closed
Copilot wants to merge 3 commits into
Closed
Handle Linux osx-arm64 dotnet tool publish without app host#606Copilot wants to merge 3 commits into
osx-arm64 dotnet tool publish without app host#606Copilot wants to merge 3 commits into
Conversation
Agent-Logs-Url: https://github.com/rasmus/Bake/sessions/e9072ec5-30ff-4f08-93f4-fa681567b0f5 Co-authored-by: rasmus <18956+rasmus@users.noreply.github.com>
Agent-Logs-Url: https://github.com/rasmus/Bake/sessions/e9072ec5-30ff-4f08-93f4-fa681567b0f5 Co-authored-by: rasmus <18956+rasmus@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix failing job for PR #601
Handle Linux May 20, 2026
osx-arm64 dotnet tool publish without app host
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
dotnet publishforosx-arm64was failing on Linux withNETSDK1084(missing app host), which then broke artifact validation forbin/Release/publish/osx-arm64.This change scopes a Linux-only fallback for
osx-arm64tool publish so publish succeeds and artifact expectations stay aligned.Composer: Linux
osx-arm64fallback recipeDotNetComposer, forPackAsTool+ targetosx-arm64on Linux:SelfContained=false)UseAppHost=false).dllartifact name (NetCore.Console.dll) instead of host binaryDotnet command generation: explicit non-self-contained for fallback
DotNet.PublishAsync, whenUseAppHost=falseis present and recipe is not self-contained, emit--self-contained falseto avoid SDK inference conflicts.Tests: artifact and recipe expectations updated
NetCoreConsoleTests: Linux assertion forosx-arm64now expectsNetCore.Console.dll.DotNetComposerServiceTests: added focused coverage asserting Linuxosx-arm64publish recipe usesSelfContained=false,PublishSingleFile=false,UseAppHost=false, and.dllartifact naming.Original prompt
Fix the failing job for PR #601 in repository
rasmus/Bakeon branchadd-osx-arm64-default-platform.Observed failure from GitHub Actions job 76897370692 in run 26144691916:
.NET SDK 10.0.300fails duringdotnet-publishwitherror NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'osx-arm64'..../bin/Release/publish/osx-arm64does not exist.PlanThenApply(Warning),PlanThenApply(Error),PlanThenApply(Fatal), andRun.Please inspect the workflow, the failing tests, and the implementation that builds the
dotnet-publishcommand/configuration. Make the minimal correct change on branchadd-osx-arm64-default-platformso the tests pass.Likely fix direction:
osx-arm64publish scenarios that run on Linux CI, disable app host generation (equivalent to adding-p:UseAppHost=false) when publishing for that RID, unless the code path is specifically intended to require an app host.Create a pull request with the code changes if supported by the workflow of this tool, using a concise PR title and include a clear explanation of the fix.
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: Please find a solution for this failing job. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.
Assistant: The failure is caused by the test fixture trying to publish for
osx-arm64on a Linux runner with a .NET SDK that does not provide an app host for that RID.Root cause
From the failing job logs at commit
f021bdba15c845115e3b29b0b12682dabce25bf7:.NET SDK 10.0.300fails with:error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'osx-arm64'..../bin/Release/publish/osx-arm64but that directory is never created.
PlanThenApply(Warning)PlanThenApply(Error)PlanThenApply(Fatal)RunThe workflow itself is simple and delegates to the shared pipeline definition:
.github/workflows/pull-requests.ymlatf021bdba15c845115e3b29b0b12682dabce25bf7Solution
Update the test inputs or publish recipe expectations so
osx-arm64is not published with an app host from this Linux environment.The safest fix is to make the publish step for
osx-arm64framework-dependent and disable app host generation.Code change to apply
Wherever the failing integration tests define the
dotnet-publishstep forosx-arm64, add:or the equivalent Bake argument/property.
If the publish command currently looks like:
change it to:
If it is emitted through Bake recipe configuration, the equivalent should be something like:
If these tests validate produced artifact directories
Keep the expected output directory, but only if the publish is intended to succeed without an app host. If the scenario specifically requires a native executable/app host, then
osx-arm64should be removed from Linux-based test coverage instead.That alternative fix would be:
Recommended fix
Prefer this logic:
UseAppHost=falseforosx-arm64osx-arm64on macOS runnersWhy this is the right fix
The logs show
linux-x64publish succeeds, whileosx-arm64alone fails. That indicates the failure is not general publish logic, but specifically app host resolution for that RID on the current SDK/runner combination.Suggested patch shape
If your test/build code constructs per-RID publish settings, apply conditional logic like:
If the test snapshots or expected command text assert the exact command line, update them to include:
for
osx-arm64.Summary
Fix the failing job by changing the `osx-arm...
This pull request was created from Copilot chat.