Categories
.NET .NET 10 C# CLI Code Desktop Developer File Apps Mobile Tips Visual Studio VS Code VS2022 VS2026 Windows

Run C# Source Files Directly in .NET 10

The file app is a new feature in .NET 10 that lets you run a C# source file directly without requiring a project file, like dotnet App.cs. While the build system is tightly integrated with the project file, it operates virtually within the file-based app execution.

Project components like SDK, properties, references, and packages are now defined directly within the C# source file. This is done with the help of C# Ignored Directives. This ensures seamless integration with the virtual project file.

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

What’s New in the All-in-One .NET MAUI Templates Pack v8.0

As the name suggests, it has a slew of features under the hood to work with .NET MAUI.

To effectively support the Stable channel release of .NET MAUI 10, both the CLI NuGet package and the Visual Studio extension of the All-in-One .NET MAUI Templates Pack have been updated.

This v8.0 is the key enhancement for .NET MAUI 10. Check out the articles for v7.9, v7.10, and v7.11 for the feature set.

To know more about all the features of this template pack, refer to the series of articles listed here.

And to learn about key features by MAUI version, check these articles:

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

What’s New in the All-in-One .NET MAUI Templates Pack v7.11

As the name suggests, has a slew of features under the hood to work with .NET MAUI.

To effectively support the RC release (with Go-Live support) of .NET MAUI 10, both the CLI NuGet package and the Visual Studio extension of the All-in-One .NET MAUI Templates Pack have been updated.

This is the third set of enhancements for .NET MAUI 10. Check out the v7.9 and v7.10 articles for the feature set.

To know more about all the features of this template pack, refer to the series of articles listed here.

And to learn about key features by MAUI version, check these articles:

Categories
.NET .NET 10 .NET MAUI .NET MAUI 10 Android ASP.NET Core Aspire Blazor C# CLI Code Deep Dive Desktop Developer DevOps General Getting Started Hybrid Integration iOS macOS Mobile Visual Studio VS Code Web Windows Xamarin Xamarin.Forms

Integrating .NET MAUI with Aspire: A Comprehensive Guide

Aspire is now the talk of the town. You can build and orchestrate all the dependencies from one single place. In fact, it’s stack streamlined. Learn more about Aspire here.

This article discusses how to integrate .NET MAUI, Microsoft’s cross-platform UI framework, with Aspire.

Aspire supports .NET by default, but since .NET MAUI is designed for multi-targeting from a single project, it presents a minor issue. I’ll offer a workaround until it’s officially supported (coming soon).

For this, I’m using .NET 10 File-based Apps for simplicity. Aspire v9.5 supports this new feature. Consult this article to know more about C# File-apps.

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

What’s New in the All-in-One .NET MAUI Templates Pack v7.10

As the name suggests, has a slew of features under the hood to work with .NET MAUI.

To effectively support the RC release (with Go-Live support) of .NET MAUI 10 and the latest stable release of .NET MAUI 9, both the CLI NuGet package and the Visual Studio extension of the All-in-One .NET MAUI Templates Pack have been updated.

To learn about key features by version, check these articles:

To know more about all the features of this template pack, consult the articles linked here.

How to Install:

From CLI:

Here’s the command to install the CLI templates pack.

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

What’s New in the All-in-One .NET MAUI Templates Pack v7.9

As the name suggests, has a slew of features under the hood to work with .NET MAUI.

To effectively support the RC release (with Go-Live support) of .NET MAUI 10, both the CLI NuGet package and the Visual Studio extension of the All-in-One .NET MAUI Templates Pack have been updated.

First and foremost, adding support for the Visual Studio 2026 Insiders release.

To know more about the key features of .NET MAUI 10, consult this comprehensive overview article.

To know more about all the features of this template pack, consult the articles linked here.

How to Install:

From CLI:

Here’s the command to install the CLI templates pack.

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.

Categories
.NET .NET 10 .NET MAUI Android Blazor C# Code Deep Dive Desktop Developer Getting Started Hybrid iOS Learn Mobile Preview Visual Studio VS Code Web What's New Windows Xamarin Xamarin.Forms

What’s New in C# 14 – Extension Members – A Comprehensive Guide

Introduced in C# 3.0, extension methods are a valuable feature for external types, especially when those types are sealed, such as string.

Roughly two decades later, C# has now finally unveiled support for extending everything.

With the release of .NET 10 Preview 3 (C# 14), it is now possible to define static methods, instance properties, and static properties too. Support for other members will be incorporated in future releases.

Syntactically, an extension method should be defined within a top-level static class. The type of its first mandatory parameter, the one qualified with the this keyword, determines the type being extended. Henceforth, this will be referred to as the receiver type.

All standard query operators of LINQ are defined as extension methods. They are defined in the Enumerable static class within the BCL (in the System.Linq namespace).

For example, the Where extension method applies to all types that implement IEnumerable<T>. Validations and optimizations aside, the typical implementation is as outlined below.

Categories
.NET .NET 9 .NET MAUI Android Blazor C# Code Desktop Developer Getting Started Hybrid iOS macOS Mobile NuGet Toolkit Visual Studio VS Code What's New Windows Xamarin Xamarin.Forms XAML

Exploring the New RatingView Control in .NET MAUI Community Toolkit v11.2

Yesterday marked the release of v11.2 of the .NET MAUI Community Toolkit, which is based on .NET MAUI 9 SR5 (v9.0.50).

Though it serves as the extended arm of .NET MAUI app development, newcomers will discover this officially supported toolkit to be of immense value.

It provides a thorough array of essential components, including Alerts, Behaviors, Converters, Extensions, Layouts, and Views, which are vital for creating practical, real-world applications.

The Rating control is one of the most used controls while developing feedback pages. Requesting users to rate their quality of service, product reviews, questionnaires, surveys, KPIs, appraisals, feedback forms, user interactions like likes and dislikes, etc. Later, this data can be used to search, suggest, list, and improve products/services.

Categories
.NET .NET 10 .NET 9 .NET MAUI Android Blazor C# Desktop Developer General Getting Started Hybrid iOS macOS Mobile Preview Templates Visual Studio VS Code Web What's New Windows Xamarin Xamarin.Forms

.NET MAUI 10 Preview: What’s New and How to Get Started

Last month, the first public preview of .NET 10, an LTS version, was released.

A detailed blog post describing the release overview is here.

Update: .NET 10 Preview 2 is now available and is detailed here. Comes with a lot of exciting new features. Try now.

Like .NET 9, details of preview releases for .NET 10 will also be published in the GitHub discussion, and Preview 1 is here.

And what’s changed in this .NET MAUI 10 Preview 1 is here. Have a look at the tentatively planned features on .NET 10 here and Roadmap here.