Home > other >  Will my Windows Forms apps work on Mono on Mac?
Will my Windows Forms apps work on Mono on Mac?

Time:10-07

Will my Windows Forms app (.NET Framework) and Win Forms app (.NET Core) that both written on C# on WindowsOS work on Mono installed on MacOS? My purpose is to run Windows Forms apps on Mac

CodePudding user response:

They're called Windows Forms Apps. They don't run on anything but windows.

Maybe there is some hacky workaround to get them to run on other platforms, something like wine on linux perhaps, I don't know. The point is they're supposed to only run on Windows.

If you want multi-platform native apps, look up .Net MAUI

CodePudding user response:

If you don't use native Windows API, they could work, but with a lot of limitations.

However, there's a custom fork of Windows.Forms and System.Drawing that you can use to build .NET6/WinForms apps that run natively on Mac (both Intel and M1). There's no need to install neither the .NET nor Mono on the target machine, since all necessary components are embedded in the application package. Both libraries are used in production environment.

There's a sample/testing app in the repository.

  • Related