Skip to content

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

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

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

Conversation

@rmarinho
Copy link
Member

@rmarinho rmarinho commented Jul 11, 2025

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
Member Author

/backport to release/9.0.1xx-sr8

Copy link
Contributor

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 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'" />

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

Copilot AI Jul 11, 2025

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
Contributor

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

@rmarinho
Copy link
Member Author

/backport to release/9.0.1xx-sr9

@github-actions
Copy link
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.

1 participant