[ci] Fix issue with duplicate License on msi#30567
Conversation
|
/backport to release/9.0.1xx-sr8 |
There was a problem hiding this comment.
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'" /> |
There was a problem hiding this comment.
[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.
|
Started backporting to release/9.0.1xx-sr8: https://github.com/dotnet/maui/actions/runs/16216820475 |
|
/backport to release/9.0.1xx-sr9 |
|
Started backporting to release/9.0.1xx-sr9: https://github.com/dotnet/maui/actions/runs/16216827589 |
Description of Change
Fixes issues where MSI.nupkg gets 2 License files.
Follow up of https://github.com/dotnet/maui/pull/29477/files