Today, we’re thrilled to announce that the .NET MAUI VS Code extension is out of preview, and includes some long-awaited new features – including XAML IntelliSense and Hot Reload!
What is the .NET MAUI extension?
The .NET MAUI extension brings the tools you need to develop .NET MAUI apps into the lightweight Visual Studio Code experience. It’s built on top of C# Dev Kit and the C# extension, which bring in a Solution Explorer, C# Hot Reload, powerful C# IntelliSense, and much more. The .NET MAUI extension adds the ability to target mobile and desktop devices, plus – with the latest releases of the extensions – XAML IntelliSense and XAML Hot Reload, while keeping your VS Code experience streamlined and simple.
New & improved XAML editing experience
The Preview version of the .NET MAUI extension shipped with basic XAML syntax highlighting and completions, but it was far from the full experience we wanted to deliver. Over the past year, we’ve modernized the existing XAML Language Service in Visual Studio, packaged it up, and brought it over to VS Code for your .NET MAUI development. This addition, which also works with Copilot, gives you intelligent autocomplete, helpful tooltips, and seamless code navigation while you create your UIs.
Hot Reload is here 🔥
Being able to edit your code without restarting your app is one of the most powerful productivity features that .NET developers have. With the latest release, you can now Hot Reload edits to your C# and XAML files in Visual Studio Code. XAML Hot Reload is already enabled – simply edit your XAML while the app is running, and watch the changes automatically reflect in your UI!
C# Hot Reload is still in an experimental state, but you can turn it on by opening VS Code Settings (CTRL/CMD + SHIFT + ,), searching “hot reload”, and checking the box for “[Experimental] Enables Hot Reload while debugging”.
Then, edit your C# and save or press the fire icon in the debug toolbar to apply your changes!
Get started today
Today’s release is a great milestone in our VS Code journey, but we aren’t done yet! We’ll continue to listen to your feedback and work toward improved performance, reliability, and added features to make your .NET MAUI app development more streamlined. To file a bug or share a suggestion, you can use the Help > Report Issue dialog in VS Code. Just like C# and C# Dev Kit, we will release on a monthly cadence with a weekly update in the prerelease channel.
To start using the extension, you can read our Getting Started Guide or download the extension and follow the walkthrough in VS Code!
Please open source Visual Studio for Mac! Microsoft's ever growing list of abandoned tech has become crippling for those trying to make a living with this tech. At least give us a chance to help ourselves. My not so small enterprise clients are initiating a wholesale shift over to Apple tech because Microsoft is dropping support of their on tech both on Windows and Mac. VS Code is too limiting. ...
Did they turn off comments on the Visual Studio blog?
Looks like it. Weird decision..
I don’t see functions that would assist you in creating a release build for publishing to an app store, like the Play Store. While it’s possible to achieve this through command-line tools, what I’m looking for is a Release configuration similar to what Visual Studio offers. Is the absence of such a feature intentional, or will it be added in the future?
Make sure that it is reported through Help > Report Issue and then select the .NET MAUI extension with your feature request.
In the meantime there is this extension that helps you with archiving and publishing: https://marketplace.visualstudio.com/items?itemName=banditoth.VSCode-MAUI-Archive
I got an error when working with Plugin.BLE as HotReloadMobileTapInitializer uses System.Diagnostics.Trace which is an ambiguous to Plugin.BLE.Abstractions.Trace
/Users/rolf/Downloads/MauiXAMLBluetoothLE/MauiXAMLBluetoothLE/Microsoft.VisualStudio.HotReload.MobileTapInitializer/Microsoft.VisualStudio.HotReload.MobileTapInitializer.ModuleInitializerGenerator/HotReloadMobileTapInitializer.g.cs(17,45): error CS0104: 'Trace' is an ambiguous reference between 'Plugin.BLE.Abstractions.Trace' and 'System.Diagnostics.Trace' [/Users/rolf/Downloads/MauiXAMLBluetoothLE/MauiXAMLBluetoothLE/MauiXAMLBluetoothLE.csproj::TargetFramework=net8.0-ios]
The file HotReloadMobileTapInitializer.g.cs is also not available at that location and I cannot find it.
How to solve?
Did you add a "global using" in your project for Plugin.BLE.Abstractions? If so, removing that global using for now, as a temporary workaround, should avoid the Trace ambiguous reference. Let us know if you have any other issues after that.
I'll also make a permanent fix so that the HotReloadMobileTapInitializer.g.cs source (which is generated via a source generator) fully qualifies System.Diagnostics.Trace, so that this problem shouldn't happen in the future. My fix for that should be...
Thank you for the reply. Yes I added ‘global using’. Changed ‘global using Plugin.BLE.Abstractions.Trace’ to using ‘Plugin.BLE.Abstractions.Trace’ and it works fine now!
I tried debugging .net maui on an android device. It worked surprisingly well. However, the pros end there. I would consider that GA will have the most needed features. There is no way to run app on ios device, to manage nuget packages, GUI to set properties of the project, publish project, add image to images. I don't understand why to develop the extension for VS Code when the support for the Visual Studio is...
There is no way to run app on ios device
Do you mean from Windows? Because this is supported when developing with VS Code from macOS.
to manage nuget packages
This should now be possible through C# Dev Kit (which the .NET MAUI extension uses under the hood): https://devblogs.microsoft.com/nuget/announcing-nuget-commands-in-c-dev-kit/
And the rest is also some solution for. However, keep in mind VS Code is a code editor with cool extensions and not a replacement for...
Hello!
I loved developing Xamarin.Forms apps using the Pair to Mac feature from Visual Studio. Are there any plans to bring this excellent capability to the .NET MAUI extension in the (near) future? It would be fantastic to have this brilliant ability to debug iOS apps from Windows or Linux environments on real devices or simulators.
Thank you!
“However, keep in mind VS Code is a code editor with cool extensions and not a replacement for an IDE such as Visual Studio.”
Sorry to be harsh here, but that does not fly when it’s being touted as the replacement for an existing IDE, namely Visual Studio for Mac. Having a half-baked solution forced upon us and then reading something like this is unfortunate.
Since I learned that Visual Studio for Mac will be discontinued, I have been trying to work with VS Code. It was stressful for me as someone who has lived for years in Visual Studio on Windows and Mac. Thanks for these improvements and features. This will make many things easier.
Any news on Linux Desktop support: https://github.com/dotnet/maui/discussions/339 ?
I’m also very interested in this