startups and code

Xamarin, ASPNET Core, Mac, and PC

Back to home

I have the incredible opportunity to develop mobile applications in C# using Xamarin. Now let me start by identifying my bias, I'm a Microsoft fan boy. I love C# and huge fan of ASP.Net. Ok, for those that are still reading after that disclaimer, let me start with talking about Xamarin.

Xamarin on PC

Developing Xamarin applications on a PC is great, it deploys to Android and Windows Phone easily and allows you to share libraries. You can leverage typical .Net frameworks and it works great. However, if you want to deploy to an iOS device, do NOT use a pc. It is just silly. The provisioning profile has to do the following... You need a mac, you need create an xcode app with the exact bundle name as your xamarin app, and then push that xcode app to your iOS device, then go to settings->general->device management and trust that provisioned profile. After that, you can push from the pc after you connect to your mac using Xamarin Mac Account, and then selecting the device, and then pushing from Xamarin studio to the iOS device, if you set the profile correct in your info.plist file.  Yes, it is that complicated... and I have only got it to work the first time, then I need to reload xamarin studio and hope the device gets identified on the remote device. You get the point. If you are doing iOS development then do it on a mac, ideally use Swift.

Xamarin on Mac

Recently, there is a preview version of Visual Studio for Mac. It is not ready for prime-time, don't use it for that. However, Xamarin Studio for Mac is pretty stable. I was able to develop on a Mac using dotnetcore and push to the iOS device consistently. Not much more to say. It worked... consistently.

ASP DotnetCore on Mac/PC

If you are going to develop ASP.Net applications, use yeoman scaffolding (Here is the one you want). It makes it really easy and then you can pull that project straight into a PC and it works. However, if you start on a PC, certain projects aren't supported on Mac, xproj, and be careful of the framework you use. mono vs dotnetcore vs .Net Framework on PC.  You need to use dotnet core.


If you are developing iOS app, do it in Swift and xCode. If you are using dotnetcore, be consistent from pc to mac. REST Api in dotnetcore is amazing. Clean and simple. Developing ASP.Net MVC should be done on a PC, but for those dedicated to Mac... consider using VSCode and dotnetcore. It is pretty amazing that it just works and using azure client tools, you can push directly from a terminal to production (therefore, you can create ci builds using jenkins, teamcity, or whatever).

Hope this helps some people in making decisions.  Its a brave new world out there with .Net going open source.... Thanks MS for getting on board!