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:
Does Rider have this feature at all?
Is there some magic trick that enables it?
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?
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.)
Rider uses its own debugger technology to provide Hot Reload functionality. As such, it's independent from the dotnet-watch command-line tool (that you can use when working from the terminal).
When creating a new project in Rider, we can select the WPF Application project type to start from. Just like with any other project template, we can configure a number of things like the solution and project name, the target framework and whether we want to create a source control repository at once.
To debug workflow XAMLRight-click the . xaml file that contains your workflow definition and select View Code. You will see a breakpoint displayed on the same line as the XAML element declaration of the activity that you set the breakpoint on in the design view. Invoke the debugger as described in Debug workflows.
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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With