Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin Forms 5.0.0.2012 Hot Reload Not Working

I have updated the project as per the Visual Studio prompt to Xamarin Forms 5.0.0.2012. When I deploy my Xamarin Forms app I see in the hot reload section of Vs 2019 that Hot Reload is initialising. When I make changes to the XAML and save I see that Hot Reload in connected and appears to be sending the XAML changes. However, there are no changes applied to the running app's screen. I have tried two diffrent Emulator versions and my own Samsung S8 device running Android 9.Tried scanning S.O. for answers but none.

Microsoft Visual Studio Community 2019 Preview
Version 16.10.0 Preview 1.0
Xamarin   16.10.000.21 (main@240d4e4)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer   16.10.0.0 (remotes/origin/8affbf0abc24122abd5517b2b52f1073cb52bd7b@8affbf0ab)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.
like image 585
Paul Stanley Avatar asked Apr 13 '21 06:04

Paul Stanley


People also ask

What is XAML hot reload?

The Uno Platform Hot Reload feature provides a way to modify the XAML displayed in a running application, in order to iterate faster on UI changes and Data Binding updates.

How do I refresh data in Xamarin form?

Create a RefreshView RefreshView refreshView = new RefreshView(); ICommand refreshCommand = new Command(() => { // IsRefreshing is true // Refresh data here refreshView. IsRefreshing = false; }); refreshView.


1 Answers

  1. Make sure that all projects use Xamarin.Forms packages of the 5th version.

  2. Check the MS VS studio version. Make sure that you have installed the latest stable release.

  3. Make sure you have installed latest SDKs for Android and IOS platforms.

  4. Check XAML Hot reload settings. It must be enabled.

  5. There are two modes of reloading in settings:

    a) reload only components with changes (default)

    b) reload a page entirely

if the first does not work, try the second mode.

  1. The latest MS VS version (16.11.3.0) has the button having the fire icon which forces to apply Hot reload.
  • Also one important setting that can be enabled: all changes will be applied on you click Save. So hot reload will applied only after you save the xaml (ctrl+s)
  1. Open Visual Studio Output window, choose Xamarin Hot Reload from the dropdown list, check whether a reload is started and whether changes are sent to your app using the appeared logs.

How to locate settings: MS Visual Studio Options -> Debugging-> Hot Reload. Watch the screenshot with setting using the link below:

Hot Reload settings screenshot

like image 133
Vadim Avatar answered Sep 22 '22 09:09

Vadim