Exception when trying to open API reference in MonoDevelop

When I select “Unity API Reference” from the help menu in MonoDevelop in MacOS 10.6 I get “Error while executing command: Unity Api Reference” and the following stack dump. I just installed Unity 3.4, and haven’t modified anything AFAIK. Any ideas on what’s going on?

System.NullReferenceException: Object reference not set to an instance of an object
at MonoDevelop.Debugger.Soft.Unity.SearchReferenceCommandHandler.GetCurrentToken () [0x00000] in :0
at MonoDevelop.Debugger.Soft.Unity.SearchReferenceCommandHandler.Run () [0x00000] in :0
at MonoDevelop.Components.Commands.CommandHandler.Run (System.Object dataItem) [0x00000] in /BuildAgent/work/93beeebf637645f/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandHandler.cs:61
at MonoDevelop.Components.Commands.CommandHandler.InternalRun (System.Object dataItem) [0x00000] in /BuildAgent/work/93beeebf637645f/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandHandler.cs:42
at MonoDevelop.Components.Commands.CommandManager.DefaultDispatchCommand (MonoDevelop.Components.Commands.ActionCommand cmd, MonoDevelop.Components.Commands.CommandInfo info, System.Object dataItem, System.Object target, CommandSource source) [0x00070] in /BuildAgent/work/93beeebf637645f/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:631
at MonoDevelop.Components.Commands.CommandManager.DispatchCommand (System.Object commandId, System.Object dataItem, System.Object initialTarget, CommandSource source) [0x002dd] in /BuildAgent/work/93beeebf637645f/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.Commands/CommandManager.cs:601

A workaround is to change the hotkey associated with the Unity API Reference…

  1. Go to Tools → Options
  2. Go to Preferences → Key Bindings
  3. In the Search box, search for API
  4. Click the line item for Unity API Reference, then choose a new key combination in the Edit Binding textbox below
  5. Click Apply, then click OK
  6. That’s it! Everything should work now :smile:

FYI now when you’re working with scripts, you can put your cursor on a class within the script, then press that key combination, and the Unity API Reference will launch to the definition for that class :wink: