July 11th, 2023
likeheart17 reactions

Announcing the .NET MAUI extension for Visual Studio Code

Principal Product Manager

Last month, we released the first preview of C# Dev Kit, a lightweight, editor-first experience that augments your C# development in Visual Studio Code with a Solution Explorer, native Test Explorer, AI-powered code authoring, and more.

Today, we’re excited to announce the first preview of the .NET MAUI extension, which, paired with C# Dev Kit, gives you the tools you need to develop your cross-platform .NET mobile and desktop apps with VS Code on Windows, macOS, and Linux.

You can try out the .NET MAUI extension today – let us know what you think!

Screens screenshot of a computer Description automatically generated

The .NET MAUI extension lets you develop and debug your app on devices, emulators, and simulators from VS Code. .NET MAUI and C# Dev Kit borrow some familiar features from Visual Studio to enhance your productivity, making your mobile and desktop development delightful with C# in VS Code.

What is the .NET MAUI Extension?

Code editing powered by Roslyn

C# editing is backed by the newly updated open-source C# Extension, giving you powerful IntelliSense code-completion. Along with the IntelliCode for C# Dev Kit extension, you get AI-assisted features such as whole-line completions and starred suggestions as you type.

A dropdown in a C# text editor showing intelligent autocomplete suggestions from IntelliCode

When editing your XAML, you get lightweight syntax highlighting and autocomplete that learns from your habits as you type.

Debug to any target

The .NET MAUI extension makes it easy to debug and deploy your app to your different target devices (Android, iOS, macOS and Windows). Just pick your device through the “Language Status” popup by hovering over the curly braces { }, selecting “Debug Target”, then starting a debug session (F5).

In this preview, we’ve added the following device targets:

  • On Windows, you can debug to your local Windows machine, Android emulators, and Android devices
  • On macOS, you can debug locally on your Mac, on iOS simulators or devices, and Android emulators or devices
  • On Linux, you can debug to Android emulators and devices

For more information on what’s new with .NET MAUI tooling in Visual Studio, see the Visual Studio 17.6 release blog post.

Get Started with .NET MAUI

Getting started with .NET MAUI in VS Code is easy. Just install the .NET MAUI extension, which automatically installs the C# Dev Kit and C# extensions for you. Log in with an existing Visual Studio subscription, then open or create a .NET MAUI project and start coding! Or you can follow the step-by-step walkthrough right in VS Code:

A screenshot of the dot net maui extension walkthrough in visual studio code

Given C# Dev Kit and the .NET MAUI extensions build on the same foundations as Visual Studio for some of its functionality, it uses the same license model as Visual Studio. This means it’s free for individuals, as well as academia and open-source development, the same terms that apply to Visual Studio Community. For organizations, the C# Dev Kit and its family of extensions are included with Visual Studio Professional and Enterprise subscriptions, as well as GitHub Codespaces. For additional details see the license terms.

What’s Next? Share your Feedback!

This is only Preview 1, and we will continuously update the extension and its features based on your feedback so we can deliver a great experience for everyone..

Please share your suggestions and report issues on this new experience through VS Code’s Help > Report Issue dialog. Select whether it’s a bug, feature request, or performance issue, then select “An extension” and “.NET MAUI” in the following dropdowns.

A screenshot of the report issue dialog in visual studio code

You can also see all the suggestions and issues on both the .NET MAUI extension and C# Dev Kit at this GitHub repo. Thanks for trying out this first preview. We can’t wait to hear what you think!

More about the Visual Studio product family

Visual Studio continues to be our premier C# development tool, supporting the full range of .NET workloads and project types. C# Dev Kit and the .NET MAUI extensions are exciting steps for us to bring .NET development productivity to other parts of the Visual Studio product family. For more information on the latest features added to Visual Studio, check out the Visual Studio 17.6 release announcement.

Author

Maddy Montaquila
Principal Product Manager

Maddy is a Product Manager taking the pain out of modern app dev with Aspire💫

21 comments

Discussion is closed. Login to edit/delete existing comments.

Sort by :
  • Rony Cuzco

    btw, how can i launch inside the browser?

  • Michael Werlitz

    I like it.
    Unfortunately the Android SDK manager call was done without checking and potentially using the proxy settings from VSCode. So we can’t use it at work right now. I will report it via VSCode.

  • Pruitt, David

    So let me get this straight...

    On the .NET MAUI Github repository, a "visual designer" is currently the 2nd most-commented open issue (https://github.com/dotnet/maui/issues/3439), and the #1 most-thumbs-up open issue, and that issue has been sitting open since November 2021.

    Meanwhile, rather than actually devoting the resources towards addressing an issue that the community clearly cares about, Microsoft instead decides to devote its resources to creating a Visual Studio Code extension, when such an extension doesn't even register as a user need on the list of .NET MAUI Github issues.

    I am so confused by Microsoft's decision-making process right now. Clearly they are...

    Read more
    • Sergey Ivanov

      We DO want hot reload, but it is indeed not a good replacement for a visual designer.

      Microsoft listens to us on GitHub, but they also listen to their direct customers, like large Microsoft shops (companies that mostly use their products), which they survey privately (which is not a bad thing).

      Out of curiosity – does Flutter or React Native provide a visual designer? Those tools are loved by their communities.

      • Michael Rogers

        Neither they, nor Xcode, provide a Visual Designer.

        I have used Visual Studio for Mac for years, and always found issues with it. I have to prepare notes for classes, and I couldn’t even copy and paste from VSM to Keynote without losing the formatting. So, whoever’s working on .NET MAUI with VSC, thank you, thank you!

  • Rony Cuzco

    Great extension!
    Btw, how do I debug using the android emulator, the same way as with VS2022?