Search code examples
windowsmacosframeworksmono

user32.dll not found when running mono app on Mac


I have created an application on Windows using Visual Studio and compiled it for Mono. But when I run it on a mac I encounter this problem (see image). "user32.dll not found". I thought the MonoFramework accounted for this.

Is this because I am using the MetroFramework UI?

Thanks for any help!

https://i.sstatic.net/PMRDH.png


Solution

  • This error does originate from MetroFramework (specifically this line). It seems this framework was not designed to work on Mac or rather any operating system other than Windows.

    As for your inquiry of Mono's completeness, bear in mind that sometimes framework authors decide to write native code, as opposed to using .NET's BCL, for reasons of performance or lack of supporting APIs for doing a particular thing, to name a few. The case here is that MetroFramework references user32.dll for a host of operations, such as showing a scroll bar, sending Windows messages, etc. – all of which can't be done when dealing with "just" Mono.