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.
MonoDevelop With ASP.NET Project (MVC4 in my case)
throw error when start debugging where monodevelop launch xsp4 and after that launch browser
but MonoMac.AppKit.AppKitThreadAccessException are thrown when launch browser
MonoMac.AppKit.AppKitThreadAccessException: AppKit Consistency error: you are calling a method that can only be invoked from the UI thread.
at MonoMac.AppKit.NSApplication.EnsureUIThread () [0x00000] in <filename unknown>:0
at MonoMac.AppKit.NSWorkspace.get_SharedWorkspace () [0x00000] in <filename unknown>:0
at MonoDevelop.MacIntegration.MacPlatformService.OpenUrl (System.String url) [0x00000] in /Users/anton/Repository/monodevelop/main/src/addins/MacPlatform/MacPlatform.cs:141
at MonoDevelop.MacIntegration.MacPlatformService.ShowUrl (System.String url) [0x00000] in /Users/anton/Repository/monodevelop/main/src/addins/MacPlatform/MacPlatform.cs:136
at MonoDevelop.Ide.DesktopService.ShowUrl (System.String url) [0x00000] in /Users/anton/Repository/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DesktopService.cs:94
at MonoDevelop.AspNet.Gui.BrowserLauncher.LaunchDefaultBrowser (System.String url) [0x00000] in /Users/anton/Repository/monodevelop/main/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/BrowserLauncher.cs:42
possible cause of it are
by Add ThreadSafe attribute to MonoMac
merge url: https://github.com/mono/monomac/commit/2a986b2286adae0695cb26722483ca9b57e0172e
as shown by exception message which thrown by AppKitThreadAccessException
The shared instance of NSWorkspace should be fixed to be decorated with the ThreadSafe attribute, but the only member on NSWorkspace in the Apple docs which is explicitly stated to be thread safe is "runningApplications".
MacPlatformService should perhaps be updated to access NSWorkspace from the main thread for this operation.
Or we could p/invoke launch services.
i have check the monodevelop latest commit https://github.com/mono/monodevelop/commit/8ad3dc9fcfe79fdb51ffc4f4eda14ff0fab25ac8 which fix the problem. thanks guys for awesome support :D