Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 4061 [details]
I can't make my Sparkle bindings work with Xamarin.Mac. Here is what I do:
Build MonoMac from source with the bindings (sparkle.cs) found in the folder "xammac sparkle bindings". The attached project "SparkleTest MonoMac" uses it and it works.
Build Xamarin.Mac compatible dll using the makefile found in the folder "xammac sparkle bindings". The attached project "SparkleTest XamMac" uses it with the XamMac.dll from the makefile and it doesn't work.
The library spawns fine but here is what I get on the SharedUpdater getter:
System.InvalidCastException: Cannot cast from source type to destination type. at at MonoMac.Sparkle.SUUpdater.get_SharedUpdater ()
What am I doing wrong? Is there a bug?
Sorry it took some time. The attached samples did not work (they were renamed and the script to copy the framework did not work anymore, giving null values for both).
Anyway the issue is that it's missing a call to register the assembly. Add this line to your AppDelegate before it calls anything from your sparkle assembly.
Runtime.RegisterAssembly (typeof (SUUpdater).Assembly);
I'll need to check on the Growl project - I might have forgotten to commit this (or something else changed wrt registration since then).
Note: this works for iOS since we know, at build time, every assembly being used - so it's easy to register all of them (at app startup). That's not the case when JITing, emitting new code or downloading new code.
No problem. Sorry for renaming the project I didn't think about that!
Thanks a lot it now works.