9

I am giving the JetBrains Rider IDE a try for Windows development with WPF. (I am on day 1 of my 30 day trial period.)

So, as I am running (debugging) my application, I notice that something is not right on the screen.

I open up the corresponding XAML file from within Rider, I edit it in a way that should result in a big visual difference, but nothing happens on the screen of my application. I save the XAML file from within Rider, still nothing happens on my application. I restart my application, then I see the changes.

With Visual Studio the XAML would be hot-reloaded every time I changed it, so I could see what I was doing without having to restart the application. It was buggy, but still better than nothing.

So:

  1. Does Rider have this feature at all?

  2. Is there some magic trick that enables it?

  3. I noticed that hot-reloading of XAML seems to be supported by Rider in the context of Xamarin, but I am doing WPF, so I assume that's irrelevant for me; is my assumption right?

  4. Is there any solution in DotNet for accomplishing the same thing programmatically? (E.g. I click a button on my app and my app somehow reloads its XAML.)

Mike Nakis
  • 56,297
  • 11
  • 110
  • 142

2 Answers2

7

For now, Rider does not support any XAML hot reload technologies.

In 2020.x, we are going to ship Xamarin Hot Reload feature. Related request: https://youtrack.jetbrains.com/issue/RIDER-22664

But for WPF, it is much trickier - it is impossible to 'replace' compiled markup on the fly in the running application (Xamarin.Forms does). So we have to build incremental diffs and apply them onto existing visual tree.

This is the most relevant issue for you: https://youtrack.jetbrains.com/issue/RIDER-26302

Pang
  • 9,564
  • 146
  • 81
  • 122
xtmq
  • 3,380
  • 22
  • 26
  • Thank you very much for your response. So, this means that item #4 above might be the only option that does not have a definite "No" attached to it already. Do you, or someone else out there, have any advice as to how I could perhaps go about accomplishing item #4 ? – Mike Nakis Jan 09 '20 at 07:04
  • If you want to reload part of your app at runtime, you can try to do something like this: https://stackoverflow.com/questions/910814/loading-xaml-at-runtime – xtmq Jan 10 '20 at 09:09
  • But the task in general is much complicated. I think we will implement it in Rider some time later. – xtmq Jan 10 '20 at 09:10
  • 1
    That's unfortunate! I have a hard time tolerating Visual Studio. – Paul Mar 16 '20 at 15:32
  • Hot Reload seems to be only for Xamarin. Pity :( – carloscs Jun 11 '20 at 04:02
  • Yes, implementing hot reload for desktop WPF apps is another task and much more complicated... – xtmq Jun 11 '20 at 08:55
1

As xtmq said Rider does not support any XAML hot reload technologies.

But if you would also appreciate this feature, you may upvote this on YouTrack: https://youtrack.jetbrains.com/issue/RIDER-26302

BierDav
  • 1,219
  • 1
  • 10
  • 27