Donate

XAML Hot Reload Is Disabled Because It Requires Xamarin.Forms 5.0.0.2012 Or Newer -In Visual Studio 2019

Hello,

I downloaded a couple of Xamarin Forms applications written in Visual Studio 2017 and debugged them using Visual Studio 2019. When running these projects, a notification appears below the toolbar that says "XAML Hot Reload Is Disabled Because It Requires Xamarin.Forms 5.0.0.2012 Or Newer".
XAML Hot Reload Is Disabled Because It Requires Xamarin.Forms 5.0.0.2012 Or Newer -In Visual Studio 2019
I then proceed with Updating the Xamarin.Forms Packages for these projects and another issue came up which is "The $(TargetFrameworkVersion) for Project_name.Android (v8.1) is less than the minimum required $(TargetFrameworkVersion) for Xamarin.Forms (10.0).". The solution to this error led me to StackOverflow that is to change a couple of Application and Application Manifest settings for the Android project. Changing the Compiled using Android version and Target Android version made the error go away.
Application Tab. Change the Android version target from Android 8.1 to Android 11.
The $(TargetFrameworkVersion) for Project_name.Android (v8.1) is less than the minimum required $(TargetFrameworkVersion)
The $(TargetFrameworkVersion) for Project_name.Android (v8.1) is less than the minimum required $(TargetFrameworkVersion)
Application Manifest Tab. Change the Android version target from Android 8.1 to Android 11.
The $(TargetFrameworkVersion) for Project_name.Android (v8.1) is less than the minimum required $(TargetFrameworkVersion)
The $(TargetFrameworkVersion) for Project_name.Android (v8.1) is less than the minimum required $(TargetFrameworkVersion)
I compiled the project again and it produced another error message "Could not find 2 Android X assemblies, make sure to install the following NuGet packages: Xamarin.AndroidX.MediaRouter, Xamarin.AndroidX.Palette You can also copy-and-paste the following snippet into your .csproj file." I edited the .csproj file of the android project and updated the ItemGroup node with the package references by removing them except the Xamarin.Forms and replaced with the two Nuget packages.
From
  <ItemGroup>
    <PackageReference Include="Xamarin.Forms" Version="5.0.0.2578" />
    <PackageReference Include="Xamarin.Android.Support.Design" Version="27.0.2.1" />
    <PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="27.0.2.1" />
    <PackageReference Include="Xamarin.Android.Support.v4" Version="27.0.2.1" />
    <PackageReference Include="Xamarin.Android.Support.v7.CardView" Version="27.0.2.1" />
    <PackageReference Include="Xamarin.Android.Support.v7.MediaRouter" Version="27.0.2.1" />
  </ItemGroup>
To
<ItemGroup>
	<PackageReference Include="Xamarin.Forms" Version="5.0.0.2578" />
	<PackageReference Include="Xamarin.AndroidX.MediaRouter" Version="1.2.0" />
	<PackageReference Include="Xamarin.AndroidX.Palette" Version="1.0.0.5" />
</ItemGroup>
After that, I can now run these projects.

Comments

Donate

Popular Posts From This Blog

WPF CRUD Application Using DataGrid, MVVM Pattern, Entity Framework, And C#.NET

How To Insert Or Add Emojis In Microsoft Teams Status Message

TypeScript Error Or Bug: The term 'tsc' is not recognized as the name of a cmdlet, function, script file, or operable program.