picoe / Eto

Cross platform GUI framework for desktop and mobile applications in .NET
Other
3.58k stars 325 forks source link

Error when trying to debug/run from Xamarin Studio #234

Closed reapazor closed 9 years ago

reapazor commented 9 years ago

This dumps out to the console from Eto.

2014-10-24 19:58:11.816 mono[15739:477774] No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting

While it is possible to fix this by properly bundling the application via some build scripts, being able to debug via Xamarin Studio would be quite lovely. Is there a command line option / environment variable that would feed in an existing info.plist that could be set?

(this is when trying to do this on a Mac)

cwensley commented 9 years ago

You can run & debug from within Xamarin Studio on OS X quite easily. All you need to do is create an Empty MonoMac or Xamarin.Mac application project, update the Info.plist, and add a Program.cs to start your app. I've created a wiki page that goes through the steps.

On a side note, I'm just about done addins for both Xamarin Studio and Visual Studio that you'll be able to use to create new Eto.Forms apps very easily. For now, hopefully the above works for you.

reapazor commented 9 years ago

I was and still am trying to do this from a generic empty console project (doing it from a MonoMac project works fine), but somewhat defeats the idea of one UI project for all platforms.

Is there a way / flag for the XS project to have a resource (Info.plist) bundled?


Matthew Davey dotBunny

On Sat, Oct 25, 2014 at 4:03 PM, Curtis Wensley notifications@github.com wrote:

You can run & debug from within Xamarin Studio on OS X quite easily. All you need to do is create an Empty MonoMac or Xamarin.Mac application project, update the Info.plist, and add a Program.cs to start your app. I've created a wiki page https://github.com/picoe/Eto/wiki/Running-&-Debugging-a-Mac-application-in-Xamarin-Studio that goes through the steps.

On a side note, I'm just about done addins for both Xamarin Studio and Visual Studio that you'll be able to use to create new Eto.Forms apps very easily. For now, hopefully the above works for you.

— Reply to this email directly or view it on GitHub https://github.com/picoe/Eto/issues/234#issuecomment-60495564.

cwensley commented 9 years ago

If you want Xamarin Studio integration, the only way is by using a MonoMac/XamMac project. You can still reference a shared assembly or even your console project so that all your code is in one place. Your MonoMac project is simply a stub project to bundle and run your app for the mac through Xamarin Studio.

The main reason for this is that to run mono in a Cocoa context, certain things need to be set up correctly (paths, startup location, etc). Only by creating an .app bundle, and using the launcher that is created for it, will it run on Cocoa.

reapazor commented 9 years ago

I guess I will have to resolve to that solution for now.

I am actually building the app bundle (plus windows/linux deployments) myself pre execute phase (modelled off of one of your early app bundle scripts), i wonder if I bug some people I know in the XS camp if they can point me to a command line I'm missing.

Thanks for the clarification.


Matthew Davey dotBunny

888.632.1993 x700

On Mon, Oct 27, 2014 at 4:55 AM, Curtis Wensley notifications@github.com wrote:

If you want Xamarin Studio integration, the only way is by using a MonoMac/XamMac project. You can still reference a shared assembly or even your console project so that all your code is in one place. Your MonoMac project is simply a stub project to bundle and run your app for the mac through Xamarin Studio.

The main reason for this is that to run mono in a Cocoa context, certain things need to be set up correctly (paths, startup location, etc). Only by creating an .app bundle, and using the launcher that is created for it, will it run on Cocoa.

— Reply to this email directly or view it on GitHub https://github.com/picoe/Eto/issues/234#issuecomment-60563959.

cwensley commented 9 years ago

No problem! Ideally, it would certainly be nice to run/debug a mac app in xamarin studio using a standard exe/gui project. However, if you were to ever put any mac-specific functionality in your app (styles, custom native controls, etc), you'd want to separate it out anyway.