Announcing Xamarin Hot Restart

Jimmy Garrido

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
Hot Restart 19.49s 22.66s 2.24s 3.89s
w/o Hot Restart 163.38s 11.24s 41.40s 8.12s

 

What’s Next?

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:

16 comments

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

  • Dirk Wilhelm 0

    “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?

    • Prashant CholachaguddaMicrosoft employee 0

      You read it correct. Connect an iOS device to Windows PC and deploy a Xamarin Forms iOS project

      • Dominik Roszkowski 0

        How is that possible? Does the first build need to be conducted on macOS?

    • James MontemagnoMicrosoft employee 0

      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.

  • Stuart Lang 0

    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?

    • Jimmy GarridoMicrosoft employee 0

      Xamarin.Forms is just the beginning! We plan to bring Hot Restart to other scenarios based on feedback from the community.

      • Stuart Lang 0

        Amazing!! ❤️

  • Cosmin Stirbu 0

    Hello,

    Will classic Xamarin.iOS and Xamarin.Android applications benefit from this, or does this mainly impact Xamarin.Forms applications?

    Thanks,
    Cosmin

    • Jimmy GarridoMicrosoft employee 0

      Currently it’s just Xamarin.Forms apps, but we’re prioritizing future scenarios based on community feedback!

  • Assame Dessables 0

    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.

    • Wil Wilder Apaza Bustamante 0

      this comment has been deleted.

      • Assame Dessables 0

        Thanks?

      • Mark 0

        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.

  • Eiji Kondo 0

    Any possibility of implementing Hot Reload (and Hot Restart) on Multiple Startup Projects?

  • Christian Müller 0

    This sounds awesome!

    Is it still possible to Sign Up for Hot Restart? Becuase the Button seems not to work correctly…

  • George Andguladze 0

    So why did Hot Restart feature disappear from Preview Features section in Visual Studio 2019 Version 16.5 Preview 5 ?

Feedback usabilla icon