Categories
.NET .NET 10 .NET 11 .NET 9 .NET MAUI .NET MAUI 10 .NET MAUI 11 .NET MAUI 9 Android Aspire Avalonia Blazor C# CLI Desktop Developer Extensions F# General Getting Started Hybrid iOS Linux macOS Mobile NuGet Templates Tools Visual Studio VS Code VS2022 VS2026 WASM Web What's New What's New Windows Xamarin Xamarin.Forms XAML

What’s New in the All-in-One .NET MAUI Templates Pack v9.0 – Hello Avalonia

In line with the annual release cadence, the first public preview of .NET 11, an STS version, was released last month.

The second preview was released this month. It was then followed by the much-awaited preview release of the Avalonia backend for .NET MAUI, which is now available.

Simply put, .NET MAUI renders native controls from the underlying platform. Avalonia uses Skia to draw its controls across different platforms. This allows Avalonia to offer a similar look and feel everywhere.

With Avalonia, you can use the same .NET MAUI codebase to target even more platforms, including Linux and WebAssembly.

Basically, Avalonia offers a set of .NET MAUI Handlers designed to render Skia (Drawn) controls for .NET MAUI views.

Avalonia has announced plans to align its GA with the release of .NET MAUI 11 stable later this year.

Excited to share that preview support for both is now built into the All-in-One templates pack.

As the name suggests, it has a slew of features under the hood to work with .NET MAUI. To know more about all the features of this template pack, refer to the series of articles listed here.

Categories
.NET C# CLI Desktop Developer General Getting Started Linux Tools Web What's New Windows

How to Install and Use Microsoft Edit for Simple CLI Text Edits

Want to quickly update a configuration file or edit a solution or project file? Then Microsoft Edit is the ultimate choice. It is a lightweight and easy-to-use text editor from the command line. You can do all this without ever having to switch context.

How to Install:

Plans are to add it to Windows OS soon, making it useful in places where third-party software can’t be installed.

For now, the easiest option to install this editor is using winget:

Categories
.NET .NET 10 ASP.NET Core Aspire Automation Azure Blazor C# CLI Code Desktop Developer Getting Started Linux macOS Mobile Visual Studio VS Code Web What's New Windows

Using C# Ignored Directives: A Guide for Programmers

C# – Preprocessor Directives are highly useful for writing code that can be compiled conditionally, depending on factors like the target framework, target platform, or build configuration.

For example:

#if NET9_0_OR_GREATER
// The code within this block will execute only on .NET 9 or higher
#endif

#if ANDROID
// The code within this block will execute only on the Android OS
#endif

#if DEBUG
// The code within this block will execute only in Debug mode
#endif

C# – Ignored Directives have a similar syntax but are ignored by the compiler because they are for tooling.

The real purpose of this feature is to execute a C# source file directly from the CLI. It doesn’t need a project file. Now, even the plain console app requires a project file, despite the much-simplified top-level statements feature.