Announcing Xamarin Hot Restart
Today at .NET Conf 2019, we announced Xamarin Hot Restart which enables you to test changes made to your app, including multi-file code edits, resources, and references, using a much faster build and deploy cycle.
XAML Hot Reload for Xamarin.Forms already provides fast iteration on XAML UIs by enabling you to see changes applied live in your running application. But what about other types of code and project edits? Xamarin Hot Restart will apply these types of changes to your application and quickly restart your app for rapid application development.
Xamarin Hot Restart will be available soon, so sign up to participate in the private preview today:
Update Feb 10th, 2020: A public preview of Xamarin Hot Restart is available in the latest Visual Studio 2019 version 16.5 Preview
Iterate Faster with Hot Restart
In numerous surveys and interviews, you told us the most impactful way to make you more productive was to reduce the time it takes to make and debug a change, or the “inner development loop”. We previously introduced XAML Hot Reload which eliminated the need to build and deploy when editing your Xamarin.Forms UI. But what if you need to change your view model or makes lots of small project edits?
Today, when running your app, your C# code is compiled and is used, along with your other project resources, to build an app bundle that is then deployed to your emulator, simulator, or device. Incremental builds help reduce the compilation time, however, deployments generally take the same amount of time regardless of the size of edit.
Xamarin Hot Restart works by pushing new changes to the existing app bundle already on the debug target when possible. It supports changes to code files, resources, and references so whether you are editing your view models or swapping image resources, Hot Restart lets you quickly push the changes to a device or emulator. There is no project configuration required so Hot Restart fits easily into and enhances your existing workflow. When you are debugging your app, you can edit your C# code and press the restart button to apply the changes. Your app is automatically restarted so you can test the new changes.
With Hot Restart you can debug your iOS app built with Xamarin.Forms on a device connected to your Windows machine allowing for a much faster inner development loop compared to today, seen below with the SmartHotel360 application:
|Initial Build||Initial Deploy||Incremental Build||Incremental Deploy|
|w/o Hot Restart||163.38s||11.24s||41.40s||8.12s|
The first release of Xamarin Hot Restart will be available soon on Visual Studio 2019 for Windows as a private preview and will support iOS apps built with Xamarin.Forms. We will use the private preview phase to gather feedback from developers like you and ensure we deliver a high-quality feature that meets your needs and expectations.
Following the initial release, we have plans on delivering the following items:
- iOS support in Visual Studio 2019 for Mac
- Android support in both Visual Studio 2019 for Windows and Mac
Xamarin Hot Restart is part of our commitment to make you be as productive as possible and we will continue to prioritize our roadmap based on items that you tell us are most important to you.
Sign Up for Xamarin Hot Restart Today
We invite you to sign up for the private preview so that you can be the first to try Xamarin Hot Restart. To ensure feature quality and reliability are maintained, new developers will be added to the preview in “ring” releases. Those participating in the preview may receive communications from our team asking for feedback. Your feedback helps shape Xamarin Hot Restart, so please take a few minutes out of your day to respond:
“With Hot Restart you can debug your iOS app built with Xamarin.Forms on a device connected to your Windows machine allowing for a much faster inner development loop compared to today”
Do i read this correct? I can connect my iPhone to my Windows PC and deploy to that device? I do not have to connect it to a mac or via wifi?
You read it correct. Connect an iOS device to Windows PC and deploy a Xamarin Forms iOS project
How is that possible? Does the first build need to be conducted on macOS?
Yes. You always need a Mac machine to do a full compilation, signing, and deployment for your application to production. That said, if you have an Apple developer account, you can get started with just Visual Studio and a provisioned iOS device using Hot Restart.
So if I understand this, you do a special native build once (requiring a mac) which contains this sort of host, from then on the app is stopped and the app contents are swapped out, without a native app reinstall, cutting down a massive amount of time in the build and deploy phase, and not requiring a mac for these subsequent “light-weight deploys”.
Amazing, I love this and can’t wait to get my hands on this!
One question, I see “Xamarin Forms” in the feature title, is will this end up working for regular Xamarin apps, or hybrid apps that have a mix of native and forms?
Xamarin.Forms is just the beginning! We plan to bring Hot Restart to other scenarios based on feedback from the community.
Will classic Xamarin.iOS and Xamarin.Android applications benefit from this, or does this mainly impact Xamarin.Forms applications?
Currently it’s just Xamarin.Forms apps, but we’re prioritizing future scenarios based on community feedback!
This right here, will dictate whether I stay with Xamarin or not. This is literally the last chance I’m giving it. I really hope it works right out. I know everything isn’t perfect, but I really hope this comes out to be the closest thing to sweet perfection. Please don’t let me down guys! I believe in you.
this comment has been deleted.
Can this comment be deleted? It links to a suspicious URL (office.com-setup-install.com) that’s more than likely for scamming, phishing, spreading malware or something like that.
Any possibility of implementing Hot Reload (and Hot Restart) on Multiple Startup Projects?
This sounds awesome!
Is it still possible to Sign Up for Hot Restart? Becuase the Button seems not to work correctly…
So why did Hot Restart feature disappear from Preview Features section in Visual Studio 2019 Version 16.5 Preview 5 ?