1

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.

j0k
  • 22,600
  • 28
  • 79
  • 90
Nicolas Raoul
  • 58,567
  • 58
  • 222
  • 373

2 Answers2

1

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.

Nicolas Raoul
  • 58,567
  • 58
  • 222
  • 373
0

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.

Martin Baulig
  • 3,010
  • 1
  • 17
  • 22