Skip to content
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

Built app crashes instantly #17

Open
ErroneousCreationist opened this issue Nov 24, 2023 · 1 comment
Open

Built app crashes instantly #17

ErroneousCreationist opened this issue Nov 24, 2023 · 1 comment

Comments

@ErroneousCreationist
Copy link

I have a console application made in .net and I have figured out how to use this to build it, but it doesn't seem to be working. I set my properties, set runtime targets, and run the command, and it builds to a .app just fine, but when I try to run the app it opens, crashes near instantly, then shows a 'application quit unexpectedly' popup. I have set the CFBundleExecutable correctly, when I try to run the executable directly that works as well, setting the CFPrincipalClass didn't change anything either (I'm assuming its meant to be the class where Main() is?). Same thing happens if I build it to arm64 or just x64. I am on an M1 mac, if that helps.

My source code is here

@kmorwood
Copy link

kmorwood commented Dec 8, 2023

Console applications usually run from a terminal. I don't know if there is defined behaviour for running a console application as an .app. I don't think your application actually crashes...it just 'finishes' and because the OS was expecting something different...you got the 'application quit unexpectedly' message.

You should be able to run your application from zsh (or similar) without having to do ANY of this packaging.

I build commandline tools for macOS in C# all the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants