So, you have a hankering for mobile development? Well, it depends on which way you go – Apache Cordova, Xamarin Forms, Westminster, or straight up iOS and Android development? Visual Studio can help you with all of it, but you have to get the right tools.
I’ll be honest here – I’m just starting out in Mobile dev, and some of the tools I am using are marginally useful. However, I’m trying out a bunch and seeing what’s working.
Emulators and Simulators
You definitely need to install the Visual Studio Emulator for Android. Running on a simulator is a must for any serious developer and the Visual Studio Emulator is better than the Google emulator – by a lot. Visual Studio will install it for you if you select anything mobile in the installer. If not, the link will allow you to download it.
You definitely want to try out Xamarin (just check the box when you install Visual Studio), but there are some extras. The Xamarin.Android Templates Pack is a good selection of new templates – there is a new blank app and a navigation app with Material Design plus a bunch of item templates. There is also the Xamarin Forms Player. If you have a real device and you install Xamarin Forms Player on that device, you can hook it up to Visual Studio and show what the XAML would look like on the device. I tend to use simulators more than real devices, so this is marginally useful for me.
I definitely recommend Xamarin, especially if you already code in C#/XAML. The tools they provide (including the iOS build host) are great.
On the Apache Cordova side, you can just use all the web technologies I posted about before. But, in addition, I like the Cordova Multiplatform Template. It’s not blank (and I like starting from blank), but it’s such a good starting template that it mostly works for more complex applications. Just ensure you understand it before you use it. I’ve also been playing with Onsen UI recently – it’s a set of web components for your mobile apps. I’ve found it really easy to work with and there is a Visual Studio Extension for it – the Onsen UI Templates. There are other starter packs as well – including Angular/TypeScript and Ionic. I’m just rather partial to starting blank, and I prefer the React/Flux architecture.
I did find the Visual Studio tools for Apache Cordova had a bug in it. If you are using JSX (ie. developing a React appliation), the Apache Cordova project will not deploy if any of the JSX files are open. You will see the following error:
In which case, you close all the JSX files and re-deploy your application.
XAML and Universal Windows Apps
There are two things in XAML that I want – the first is regions. Why is it not there already? Fortunately, XAML Regions is there to help. It does the folding markers within comments. The second item I want is a style formatter. I like Code Maid because it does this across many file formats and languages in a consistent manner. It also does a bunch of other editor things that I do on a regular basis, which makes it a good addition to the toolbox.
I’ve added the UWP Templates to my template list. It includes a blank app that doesn’t have App Insights, which makes it “more blank than blank” – a good starting point.
What’s not included…
ReSharper is probably the biggest thing I DON’T use. I’m sure it is a fine product and many people advise using it. It’s a trial (the full version costs $600 right now, but you get a free 30-day trial via download). I’m an individual programmer – ReSharper is definitely not on my list of things to spend money on.
Do you have a favorite?
When you are developing mobile or C#/Windows apps, what are your favorite extensions? Let me know in the comments.