Skip to content

fix: generate license assets outside maui raw#11

Merged
XeroxDev merged 3 commits intomainfrom
codex/fix-ci-build-issue-with-publish-output
Jan 16, 2026
Merged

fix: generate license assets outside maui raw#11
XeroxDev merged 3 commits intomainfrom
codex/fix-ci-build-issue-with-publish-output

Conversation

@XeroxDev
Copy link
Owner

Motivation

  • Prevent the NETSDK1152 publish conflict that happened when nuget-license generated license files overlapped with the catch-all MauiAsset Include="Resources\Raw\**" so they were double-published.
  • Avoid using path excludes in Resources\Raw as a workaround and instead produce the generated files in an intermediate build directory while preserving their final logical locations.

Description

  • Restored the simple catch-all MauiAsset Include="Resources\Raw\**" (no Exclude) and moved license generation out of the source tree to avoid duplication at publish time.
  • Modified the GenerateThirdPartyLicenses target to create $(BaseIntermediateOutputPath)ThirdPartyLicenses and run nuget-license with output files placed under $(BaseIntermediateOutputPath).
  • Added MauiAsset includes that point at $(BaseIntermediateOutputPath)third-party-licenses.json and $(BaseIntermediateOutputPath)ThirdPartyLicenses\** with LogicalName mappings so the published layout remains third-party-licenses.json and ThirdPartyLicenses\....
  • Kept CopyToOutputDirectory set to Always for the included assets so runtime access and publish output are unchanged.

Testing

  • No automated tests were run for this change.

Codex Task

Copilot AI review requested due to automatic review settings January 16, 2026 18:58
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a MAUI publish conflict (NETSDK1152) caused by duplicate asset inclusions when nuget-license generated files were caught by both the MauiAsset wildcard and explicit includes. The solution moves license generation to an intermediate build directory while preserving the final published file layout.

Changes:

  • Moved license file generation from Resources\Raw to $(BaseIntermediateOutputPath) to avoid overlap with the catch-all MauiAsset wildcard
  • Removed the workaround of explicitly removing and re-adding license assets, replacing it with direct includes from the intermediate directory with LogicalName mappings
  • Simplified the MauiAsset wildcard include by removing the need for exclusions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@XeroxDev XeroxDev merged commit b9ef204 into main Jan 16, 2026
1 check passed
@XeroxDev XeroxDev deleted the codex/fix-ci-build-issue-with-publish-output branch January 16, 2026 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant