-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
MAUI project requires bin/obj folders removed for any MacOS build following a successful one #7353
Labels
area-tooling
XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging
platform/macOS 🍏
macOS / Mac Catalyst
s/verified
Verified / Reproducible Issue ready for Engineering Triage
t/bug
Something isn't working
Comments
I follow the repro steps described above and don't run into this error.(I'm using vs main build) |
rolfbjarne
added a commit
to rolfbjarne/xamarin-macios
that referenced
this issue
May 20, 2022
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
rolfbjarne
added a commit
to xamarin/xamarin-macios
that referenced
this issue
May 30, 2022
…15080) 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
In our particular case, the issue was related to custom build steps, that created extra files and preventing the app from being properly signed. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area-tooling
XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging
platform/macOS 🍏
macOS / Mac Catalyst
s/verified
Verified / Reproducible Issue ready for Engineering Triage
t/bug
Something isn't working
Description
MAUI project requires bin/obj folders removed for any build following a successful one
Steps to Reproduce
It's not reproduced on a new MAUI project but 100% reproducible on an existing project. Steps:
dotnet build -t:Run -f net6.0-maccatalyst
Result - the error
Failed to codesign 'xxx.app'
Version with bug
Release Candidate 3 (current)
Last version that worked well
Unknown/Other
Affected platforms
macOS
Affected platform versions
MacOS 12.3.1
Did you find any workaround?
Remove bin/obj folders before each build
Relevant log output
No response
The text was updated successfully, but these errors were encountered: