Question

I am trying to build SparkleShare on Mac.

Monodevelop throws an error:

error CS0246: The type or namespace name `NSUserNotification' could not be found. Are you missing a using directive or an assembly reference?

In Monodevelop, when I begin typing MonoMac.Foundation.NSUser, the only suggested item is NSUserDefaults, NSUserNotification is not suggested.

Is this kind of cross-compilation possible?
I can't upgrade to 10.8 because I also want to check how the user experience is on 10.6.

Was it helpful?

Solution

Run:

git clone https://github.com/mono/monomac
git clone https://github.com/mono/maccore
cd monomac
make

It should generate MonoMac.dll. Copy it to wherever your MonoMac.dll is, restart Monodevelop, the project should now build fine.

OTHER TIPS

I just had a look at MonoMac's source code, and NSUserNotification is a recent addition, it has been added three months ago: https://github.com/mono/monomac/commit/2c4a8c639254705e0dde1ce32f4e49cfcb72187e.

These are the generated files:

As a workaround for older MonoMac versions, you can simply copy these into your code.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top