eddiejsdev
eddiejsdev

Reputation: 81

Hot Reload not working for .Net Maui in JetBrains Rider?

I'm creating an ios/android app with .Net Maui and can't get hot reload to work on any platform. Is this working for anyone?

I've tried installing and reinstalling and doesn't work.

Mac Mini Intel Ventura 13.0.1

Rider Version - 2022.3.2

Upvotes: 3

Views: 6609

Answers (2)

widavies
widavies

Reputation: 976

Looks like hot reload for MAUI was added to EAP2 2023.2.

You can switch to EAP builds by opening Jetbrains Toolbox, selecting "Settings" and checking "Early Access Program":

Jetbrains Toolbox

In order to use it, simply run your MAUI app in debug mode and hit CTRL+S after you make a XAML change.

Upvotes: 3

eddiejsdev
eddiejsdev

Reputation: 81

After some more research I found out that Jetbrains has this feature on their backlog and there's still no timeframe for a release: Jetbrains Support

There is a workaround that is a bit hacky but works.

These are the steps:

  • Open your project in Visual Studio
  • Open your project in Rider (yes both Ides open)
  • Run your project in Visual Studio
  • Modify and save your files in Rider
  • Click on Visual Studio (make sure you have the current layout file open in VS or changes won't be picked up)
  • You should see your simulator update once you click on VS

Here's an example

Since I rather use Jetbrain's Ide than VS I can deal with the extra step. I even like that it only refreshes once you click VS. Sometimes I'm working on a layout on VS and hot reload is a bit aggressive and updates with every little change and I don't like that.

This works for most cases but there were a few times in which hot reload will stop working. Just open and close VS and it should work again.

Upvotes: 4

Related Questions