-
Notifications
You must be signed in to change notification settings - Fork 518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[msbuild] Improve logic to clean up app bundle for unwanted files. #15080
[msbuild] Improve logic to clean up app bundle for unwanted files. #15080
Conversation
The current directory at launch is the root directory of the app bundle. This means that any files written to the current directory when an app is executed, will be placed there. This becomes a problem when the app is rebuilt (and resigned), because a valid macOS app bundle doesn't have any files in the root directory of the app bundle, so signing fails. We have logic to automatically crash crash reports from the app bundle, but it turns out this is a more common problem with other types of files (and folders), so improve the logic a bit: * Add support for setting a property to automatically clean up everything from an app bundle we don't think should be there (which is anything not in a Contents/ subdirectory). * Use the same property to add support for disabling any cleaning (we already clean mono's crash reports by default). * Improve detection of unwanted files to include directories inside the app bundle, not only files. Ref: dotnet/maui#7353
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️ the test.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment was marked as outdated.
This comment was marked as outdated.
💻 [PR Build] Tests on macOS Mac Catalina (10.15) passed 💻✅ All tests on macOS Mac Catalina (10.15) passed. Pipeline on Agent |
❌ [PR Build] Tests on macOS M1 - Mac Big Sur (11.5) failed ❌Failed tests are:
Pipeline on Agent |
📋 [PR Build] API Diff 📋API diff (for current PR)ℹ️ API Diff (from PR only) (please review changes) .NETXamarin vs .NETAPI diff (vs stable)✅ API Diff from stable .NETXamarin vs .NETGenerator diff✅ Generator Diff (no change) Pipeline on Agent XAMBOT-1105.Monterey' |
The current directory at launch is the root directory of the app bundle. This
means that any files written to the current directory when an app is executed,
will be placed there. This becomes a problem when the app is rebuilt (and
resigned), because a valid macOS app bundle doesn't have any files in the root
directory of the app bundle, so signing fails.
We have logic to automatically crash crash reports from the app bundle, but it
turns out this is a more common problem with other types of files (and
folders), so improve the logic a bit:
an app bundle we don't think should be there (which is anything not in a
Contents/ subdirectory).
clean mono's crash reports by default).
bundle, not only files.
Ref: dotnet/maui#7353