Cross-Platform .NET Development

Explore the power of .NET to build applications that run seamlessly across a wide variety of operating systems and devices. With .NET, you can leverage a single codebase to target Windows, macOS, Linux, iOS, Android, and the web.

Key .NET Technologies for Cross-Platform Development

.NET (formerly .NET Core)

The modern, open-source, cross-platform framework that forms the foundation for building high-performance applications. It's designed from the ground up for cloud-native, local, and IoT applications.

Xamarin

Empowers you to build native iOS, Android, and macOS applications from a single, shared C# codebase. Xamarin.Forms allows for UI code sharing across platforms.

MAUI (.NET Multi-platform App UI)

The evolution of Xamarin.Forms, .NET MAUI is a cross-platform framework for creating native mobile and desktop apps from a single C# codebase. It supports Windows, macOS, iOS, and Android.

Blazor

A framework for building interactive client-side web UIs with .NET. Blazor enables you to use C# for front-end development, either in the browser with WebAssembly or on the server.

Getting Started

To begin your cross-platform journey with .NET, ensure you have the latest .NET SDK installed. You can download it from the official .NET website.

Here's a quick example of a simple console application that runs on multiple platforms:

using System;

            public class Program
            {
                public static void Main(string[] args)
                {
                    Console.WriteLine($"Hello, Cross-Platform World from .NET!");
                    Console.WriteLine($"Operating System: {Environment.OSVersion}");
                }
            }
            

You can compile and run this code using the .NET CLI:

dotnet new console -o MyCrossPlatformApp
            cd MyCrossPlatformApp
            # Replace the content of Program.cs with the code above
            dotnet run
            

Resources