Skip to content

fix: copy Assets folder in RID-specific and publish builds - #9

Merged
pexatar merged 1 commit into
mainfrom
fix/assets-copy-to-publish
Mar 20, 2026
Merged

pexatar merged 1 commit into
mainfrom
fix/assets-copy-to-publish

Conversation

@pexatar

@pexatar pexatar commented Mar 20, 2026

Copy link
Copy Markdown
Owner

without CopyToOutputDirectory is handled by WinUI 3 targets only for the default (non-RID) output. Self-contained publish with -r win-x64 and RID-specific builds silently skip Assets, causing DirectoryNotFoundException at runtime for PassKey.ico.

Added CopyToOutputDirectory and CopyToPublishDirectory=PreserveNewest so Assets (PassKey.ico, logos) are deployed in all build configurations.

Description

Brief description of the changes in this PR.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)

Testing

Describe the tests you ran to verify your changes.

  • All existing tests pass (dotnet test)
  • New tests added for new functionality
  • Solution builds without warnings (dotnet build PassKey.sln -p:Platform=x64)

Checklist

  • My code follows the project's code style guidelines
  • I have added XML documentation to all new public types and members
  • I have updated the CHANGELOG.md if applicable
  • My changes do not introduce new compiler warnings

<Content Include="Assets\**" /> without CopyToOutputDirectory is handled
by WinUI 3 targets only for the default (non-RID) output. Self-contained
publish with -r win-x64 and RID-specific builds silently skip Assets,
causing DirectoryNotFoundException at runtime for PassKey.ico.

Added CopyToOutputDirectory and CopyToPublishDirectory=PreserveNewest
so Assets (PassKey.ico, logos) are deployed in all build configurations.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@pexatar
pexatar merged commit 503a42d into main Mar 20, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant