Skip to content

[ci] Fix issue with duplicate License on msi#30567

Merged
rmarinho merged 1 commit into
mainfrom
Fix-issue-with-duplicate-License-on-msi
Jul 11, 2025
Merged

[ci] Fix issue with duplicate License on msi#30567
rmarinho merged 1 commit into
mainfrom
Fix-issue-with-duplicate-License-on-msi

Conversation

@rmarinho

@rmarinho rmarinho commented Jul 11, 2025

Copy link
Copy Markdown
Member

Description of Change

Fixes issues where MSI.nupkg gets 2 License files.

Follow up of https://github.com/dotnet/maui/pull/29477/files

Copilot AI review requested due to automatic review settings July 11, 2025 09:35
@rmarinho rmarinho requested a review from a team as a code owner July 11, 2025 09:35
@rmarinho

Copy link
Copy Markdown
Member Author

/backport to release/9.0.1xx-sr8

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 prevents the MSI project from including a duplicate License file in its NuGet package by applying a project-specific condition to the Pack attribute.

  • Adds a condition to skip packing the license file when building msi.csproj
  • Leaves third-party notices packaging unchanged
Comments suppressed due to low confidence (1)

Directory.Build.targets:109

  • There’s no test coverage verifying that the MSI package no longer contains the License file. Please add or update a packaging test to assert the license file is excluded for the MSI project.
          Pack="true" Condition="'$(MSBuildProjectFile)' != 'msi.csproj'" />

Comment thread Directory.Build.targets
<None Include="$(LicenseFile)"
PackagePath="$([System.IO.Path]::GetFileName('$(LicenseFile)'))"
Pack="true" />
Pack="true" Condition="'$(MSBuildProjectFile)' != 'msi.csproj'" />

Copilot AI Jul 11, 2025

Copy link

Choose a reason for hiding this comment

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

[nitpick] Using the hardcoded filename 'msi.csproj' may be brittle if the project filename changes. Consider defining a property (e.g. IsMsiProject) or using $(MSBuildProjectName) for a more maintainable filter.

Copilot uses AI. Check for mistakes.
@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/9.0.1xx-sr8: https://github.com/dotnet/maui/actions/runs/16216820475

@rmarinho

Copy link
Copy Markdown
Member Author

/backport to release/9.0.1xx-sr9

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/9.0.1xx-sr9: https://github.com/dotnet/maui/actions/runs/16216827589

@rmarinho rmarinho merged commit a7cb612 into main Jul 11, 2025
115 of 129 checks passed
@rmarinho rmarinho deleted the Fix-issue-with-duplicate-License-on-msi branch July 11, 2025 11:01
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants