简体   繁体   中英

Will my Windows Forms apps work on Mono on Mac?

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

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM