You can use Xamarin to develop .NET apps to run on iOS or Android instead of Windows. In this article, Julio Sampaio demonstrates the Uno Platform. You can build cross-platform applications using Uno which has even more options.

Back in 2016, Microsoft raised the company’s level of confidence in the mobile world with the acquisition of Xamarin. Xamarin is Microsoft’s open source platform for building Android and iOS apps with .NET and C#.

C## has proven its worth through all these years and brought with it tons of mature projects as well as having a solid community. When it comes to the in-house solutions for mobile development, no one has beaten Xamarin.Forms. It extends the .NET developer platform to Android, iOS, and, of course, Windows apps. This is all from a single and shared codebase.

However, it’s not the only option out there. Now there is the Uno Platform. It offers even more options like targeting all the major platforms (iOS, Android, Windows), as well as native mobiles and web browsers.

The official documentation states:

Familiarity and richness of C## and XAML combined with productivity boosts of hot reload, hot restart, edit, and continue and more.

In addition to those features, Uno also supports WebAssembly, dev loops, automatic responsive designs, and more. You will find a couple of showcases on their official website, which you can browse through to learn more about Uno capabilities. However, this article explores the framework via the installation and creation of a simple app that converts a given temperature from Celsius to Fahrenheit and vice-versa. This way, you might experience the platform a bit deeper. So, come with me!

Install and configure

First, you need Visual Studio installed. The Community edition is just fine for this example.

You can also develop for Uno with VS Code, but this article sticks with Visual Studio since it offers more flexibility and ready-to-use options.

If you have already installed Visual Studio, chances are that you didn’t install at least one of the following workloads:

  • Universal Windows Platform development
  • Mobile Development with .NET
  • ASP.NET and web

If that’s the case, no worries. I’ll help you to fix that.

Search for the Visual Studio Installer program and run it. Once it pops up, make sure that it has no available updates to install. If it has, just push the update button and wait until it gets finished.

Click the Modify button and select the needed workloads, then click the Install button.

Then, download the latest version of .NET Core for your OS, to make sure Uno will have the proper version to work with.

The Android Studio

You’ll also need to install the Android Studio on your computer. The reason I’m picking only Android to make the tests is that it is OS-agnostic, which means that anyone can run it regardless of if you have a Windows or macOS. However, feel free to go with iOS if you are comfortable enough to work with it.

Go ahead and install it according to the official installation instructions. Just remember that when you start the Android Studio for the first time, it’ll download several required libraries and dependencies, so make sure to start it right after the installation.

Finally, install the Uno extension for Visual Studio. To install it, open your Visual Studio IDE and go to Extensions > Manage Extensions, then search for the term uno. In the result list, select the option Uno Platform Solution Templates and download it.

#.net development #c# programming #homepage #sql prompt

Building cross-platform apps with .NET and Uno
2.00 GEEK