Visual Studio

Uno Platform 3.11: Support for .NET 6 RTM, VS 2022 17.1 Preview 1

It was a busy week with 3 full days of .NET Conf – the exciting launch of .NET 6 and Visual Studio 2022. The scalability, reliability, and performance of Visual Studio 2022 have all been significantly improved. On our side the first tests of Uno Platform on .NET 6 RTM are showing great performance improvements on Visual Studio 2022 across several fronts, including Android and WebAssembly. More on this at our UnoConf…. Uno Platform 3.11 release ships 160+ features and bug fixes and adds support for  .NET 6 RTM with all related improvements.   As Microsoft had announced the delay for .NET 6 support for Android and iOS, we’ve re-introduced Xamarin-based templates for Visual Studio 2022. Additionally, the support for preview .NET 6 Android and iOS has now been moved to 17.1 Preview 1. In Visual Studio 2022, you’ll find now two templates: One named Multi-Platform App (UnoPlatform|xamarin), which uses the existing stable Xamarin “Classic”. It is the same as found when using Visual Studio 2019. One named Multi-Platform App (UnoPlatform|net6), which uses the .NET 6 preview support for iOS, Android, macOS and Catalyst and requires Visual Studio 17.1 preview 1. To use this new release, you can setup your

Uno Platform, Visual Studio 2022 and Hot Reload

Visual Studio 2022 Preview 1 has just been released and we are already working to make sure Uno Platform is along for the ride. Alongside the significantly improved solution load time experience, the C# Hot Reload feature has also been improved, and it’s working great with our Skia/GTK heads (other platforms will come soon)! Take a look:   You can see in this video code-behind hot reload, XAML and x:Bind Hot Reload! This feature is now available since Uno Platform uses XAML to C# source generation, and the new Visual Studio Hot Reload feature re-generates the C# code on code changes.   The Visual Studio Extension is not yet available for creating new projects, as it needs some 64-Bits enhancements, yet you can use our dotnet new templates instead, or use the trusted Visual Studio 2019.   About Uno Platform For those new to Uno Platform – it allows for creation of pixel-perfect, single-source C# and XAML apps which run natively on Windows, iOS, Android, macOS, Linux and Web via WebAssembly. Uno Platform is free and Open Source (Apache 2.0) and available on GitHub.   Next Steps If you are new to Uno Platform, the best way to get started is

Debugging Uno Platform WebAssembly apps in Visual Studio 2019

The .NET team has been hard at work with WebAssembly support, and while we’ve been having WebAssembly debugging from the browser, it’s now possible to debug an Uno WebAssembly app using Visual Studio 2019 16.6 Preview 1! Debug an Uno Platform WebAssembly Web app with Visual Studio Here’s what you need to do to debug an Uno application in Visual Studio: Install the latest Uno Platform Visual Studio templates Create an Uno Cross Platform App using the Visual Studio templates In the Nuget Package manager Update the Uno.UI the preview release 2.2.0-dev.358 Update Uno.Wasm.Bootstrap and Uno.UI.RemoteControl packages to the preview release 1.2.0-dev.16 Add a reference to the Uno.Wasm.Bootstrap.DevServer package In YourProject.Wasm.csproj, manually change the Uno.Wasm.Bootstrap.Cli package version to the same version installed for Uno.Wasm.Bootstrap. (Note, this instruction was removed as of preview version 1.2 of the bootstrapper, use the line above instead) In YourProject.Wasm.csproj, manually remove the DotNetCliToolReference package reference In MainPage.xaml, replace the Grid content with the following: <StackPanel> <TextBlock x:Name=”txt” Text=”Hello, world!” Margin=”20″ FontSize=”30″ /> <Button Content=”click” Click=”OnClick” /> </StackPanel>   In your MainPage.xaml.cs, add the following method: public void OnClick(object sender, object args) { var dt = DateTime.Now.ToString(); txt.Text = dt; }   And the last important step, in

Build .NET AOT for WebAssembly in Visual Studio with Uno Platform

It’s been a long-time request: Build Uno Platform WebAssembly apps in Visual Studio on Windows using Ahead of Time (AOT) compilation. Good news, it’s now available in preview in Uno dev branch! The Uno.Wasm.Bootstrap package 1.1-dev.416 package now provides the ability to create AOT, Mixed (AOT+Interpreter) and Interpreter (with Bitcode dependencies) builds on Windows 10, without leaving Visual Studio 2019. To our knowledge, Uno is the first one to provide this kind of functionality. If we are not – please let us know in the comments below; maybe we missed something. This new Uno feature makes transparent use of the Windows Subsystem for Linux (WSL) to create the final binaries. You’ll only need to setup your WSL environment once using a simple script, and don’t worry if you forget to set it up, the bootstrapper will explain what to do.   Quick Start – Uno, Visual Studio, WASM, AOT Make sure WSL with Ubuntu 18.04 is installed Install the latest Uno Visual Studio templates Create a new Uno Cross Platform app project Update the Uno.Wasm.Bootstrap and Uno.Wasm.Bootstrap.Cli nuget packages to 1.1-dev.416 or later, using the Nuget Package manager (There’s no need to update other packages) In the Wasm project, add