简体   繁体   中英

Making a c# application on windows compatible with Mac

I have created ac# visual studio application in Windows. The app is finished it works perfectly fine. I created this for my work where we use both windows and Mac's. Other than rewriting all of the code how can I make my application compatible for Macs. I read about Xamarin, but it looks like it's used from the beginning rather than after the application is finished. Thanks

There is nothing automatic that can do what you want.

I would just separe the UI from the rest of the code and write an UI for Mac with Xamarin, making use of some industrial-strength patterns like MVVM

(it's not an easy task, but can be done)

If it is a GUI / WPF app, take a look at Mono . You will likely have to make some changes but its nothing like Xamarin which you're right, would be a complete rewrite.

If it is a webapp or console app, .NET Core is fantastic and I've used it quite a bit. This is Microsoft's latest .NET implementation and it is designed to run in a container a little bit like Docker, where you have a portable "unit" of sorts.

Could benefit from a little more detail about what type of application this is, but hope that helps!

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