Csc hello.cs -r:System.Windows.Forms.dll The compiler will create “hello.exe”, which you can run using: mono hello.exe NOTE: on macOS you’ll have to wait around a minute the very first time you run this command. You also need to use mono32 since WinForms isn’t supported on 64bit yet. As of macOS 10.15 Catalina there’s no 64bit support. May 01, 2018 Visual Studio 2017 - Windows Forms -ListView add items and read selected - Duration. How To Create Windows Application Forms with C & Visual Studio 2017 - Duration: 7:37. Use the Visual Studio debugger to quickly find and fix bugs across languages. The Visual Studio for Mac debugger lets you step inside your code by setting Breakpoints, Step Over statements, Step Into and Out of functions, and inspect the current state of the code stack through powerful visualizations.
- Create Windows Forms App On Visual Studio Mac Monograms
- Create Windows Forms App On Visual Studio Mac Monogram
Answers
Create Windows Forms App On Visual Studio Mac Monograms
Create Windows Forms App On Visual Studio Mac Monogram
I heard that Xamarin Forms is want to create app for Mac, but you still need a Mac for debug.
https://blog.xamarin.com/preview-bringing-macos-to-xamarin-forms/Thanks, @YuriKuznetsov . I have a Mac and I use it to enable my iOS debugs in Xamarin, but it doesn't seem to work the same way for MacOS. Not sure why it would be any different. Does anyone out there have any experience with this?
I am not aware of any way to create a Mac project on a windows pc
- edited June 2018
Thanks, @kentucker ! It's sad that it can't be done AT LEAST the same way we do with iOS. I guess I'll just copy my solution over to the Mac, remove all the projects that Mac is fussing over, and build a Mac app.
Going to be a pain whenever I make a code improvement, though. I'll have to do it to all over again. ):
I wonder if Admob and In App Purchase plugins will work on the Mac.
- USForum Administrator, Xamarin TeamXamurai
I know you can not build your Xamairn.Mac application on Windows, as building a bundle requires invoking the native toolchain (clang, ibtool, etc) that is macOS only. There is very limited support for building macOS Modern libraries, mostly for cross platform nuget use cases, so I'm unsure if the project is loadable. In general however, you can just unload the macOS specific csproj from your solution. Imagine a project structure:
- Project.Model.Tests.csproj
- Project.Model.csproj
- Project.Mac.csproj
- Project.Windows.csproj
If all of those were in the same solution, you could just unload Project.Mac.csproj when on Windows and Project.Windows.csproj on macOS and build the shared logic, tests, and the specific UI for your platform.
Thanks for the info, @ChrisHamons . Guess I'll map my solution to a network drive and hope it's not to slow! Anyone know about in app purchases with Mac?
- USForum Administrator, Xamarin TeamXamurai
You likely want StoreKit: https://developer.apple.com/documentation/storekit?changes=_2&language=objc
which is bound in Xamarin.Mac.
This looks to be a great tutorial, but is written in Objective-C (and iOS, but I believe the ideas are the same): https://www.raywenderlich.com/122144/in-app-purchase-tutorial
As always, I suggest reading this documentation to help understand the Objective-C enough to translate it to C#:
Small addendum to ChrisHammon's reply: you can also create separate build configurations for MacOs Debug, MacOS Release, Windows Debug, Windows Release, and so forth, and then turn the appropriate projects on and off in the respective configurations. I've done that with my current project, though I haven't yet deleted the original Debug/Release configurations - something to try when I have nothing else underway so I can recover from Git. :-)
I can, however, confirm that adding configurations works well. Add them using Windows VS rather than Mac VS. For reasons I don't understand Mac VS boogers them.
I have to admit, I don't understand why Xamarin on a PC can't build a Mac application. I mean, I have the Mac, I have an Apple Developer Licence, and Xamarin merrily fires up XCode on the Mac to build for iOS. Would it really be so much work to get it to do the same for Mac?
Can I vote for this feature anywhere?
In game development, for example, it is extremely common, almost routine, for the PC to be the development environment and to remote-debug on whatever the target platform happens to be. I was doing that over twenty years ago on a PS1 and a Nintendo connected to a Windows PC running VS.
Comment from Xamarin anyone?
- Patrick
- USForum Administrator, Xamarin TeamXamurai
If you wish to provide feedback, may I suggest giving it here: https://developercommunity.visualstudio.com/spaces/8/index.html
What you are suggesting is technically possible, and it is what we do for iOS. When you build a iOS project on Windows, we remote to a macOS machine and compile over there. This is required, since the toolchain (libraries, clang, etc) for iOS only runs on a mac. If Apple provided the toolchain on other platforms we would likely support this use case without remoting. Fundamentally it would be possible to do this for macOS as well, thought a lot of work.
However, I'm not sure it would as helpful in many cases as people would suspect. You can easily test your iOS application when working on Windows by deploying to your phone and looking at that. To actually launch your macOS application though, you'd need to be in front of a mac anyway.
It's a reasonable feature request however, so please feel free to express your opinion in dev community.