💻

Getting Started with .NET MAUI for VS Code

Nov 16, 2024

.NET MAUI Extension for VS Code

Overview

  • .NET MAUI (Multi-platform App UI) extension allows building cross-platform apps.
  • Built on C# and C# Dev Kit.
  • Offers tools such as IntelliSense, Solution Explorer, and package management.
  • Key features include debugging, project switching, and multi-platform app development.

Quick Start Guide

  1. Install the .NET MAUI extension
    • C# and C# Dev Kit will install as dependencies.
  2. Open or Create a MAUI Project
    • Open a folder with a .NET MAUI project (.csproj or .sln).
    • Or use Solution Explorer or Command Palette to create a new MAUI project.
  3. Select Debug Target
    • Choose debug target via status bar and press F5 to start debugging.

Features

  • Debugging: Debug on emulators, simulators, and devices.
  • Deploy Targets: Easily switch targets and build for all MAUI platforms.
  • C# Dev Kit Features
    • Includes Solution Explorer, Test Explorer, code navigation, refactoring, and Roslyn-powered features.
  • XAML UI Editing
    • Syntax highlighting and IntelliSense.
  • Hot Reload: Apply changes without restarting the app.

Supported Debug Targets

OSPlatforms Supported
WindowsWindows, Android
macOSAndroid, iOS, macOS
LinuxAndroid
  • Compilation checks are available for all platforms on any OS.

Requirements

  • .NET 7 or greater with MAUI workload.
  • Activated C# Dev Kit extension with a Visual Studio or IntelliCode subscription.
  • Android: Requires Android SDK.
  • iOS/macOS: Requires latest Xcode.

Known Limitations

  • Framework switching for IntelliSense is not yet available.
  • C# Hot Reload off by default, can be enabled in settings.
  • Issues with new project templates may require reinstallation of MAUI workload.

Reporting Issues

  • Use VS Code's Help > Report Issue to file new issues.
  • Issues can also be reported on the C# Dev Kit GitHub Repo.

Feedback

  • FAQs: FAQs link
  • Provide Feedback: File issues or feature requests on GitHub.
  • Known Issues: React to existing issues to prioritize them.
  • Survey: Quick survey link to provide feedback on the extension.