Bug: Hot Reload and Uno Platform Studio crash when invoked from Elapsed
- Dominant language
- C#
- Stars
- 7
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
### Description
It appears that Uno's hot reload and Studio features crash when invoked from the current version of Elapsed.
They are automatically invoked here:
https://github.com/Lamparter/Elapsed/blob/f6b86c5fc4a3dc7b217d2605a77f0dd619cbf638/src/app/Riverside.Elapsed.App/App.xaml.cs#L93-L95
However, they seem to crash on start-up (the app still runs, but without hot reload or hot design).
### Steps to reproduce
1. Run the app in preview configuration
2. See the error in console with Hot Reload and Uno Platform Studio
3. See the status indicator error
### Log File
```b
fail: Uno.Diagnostics.UI.DiagnosticsOverlay+DiagnosticElement[0]
Failed to get preview for Hot Reload.
System.InvalidOperationException: Cannot resolve the hot-reload client.
at Uno.UI.HotDesign.Client.HotReload.HotReloadStatusView.Create(IDiagnosticViewContext ctx)
at Uno.UI.HotDesign.Client.HotReload.OnAssemblyLoading.g__ViewFactory|0_0(IDiagnosticViewContext ctx)
at Uno.Diagnostics.UI.DiagnosticViewManager`2.GetView(IDiagnosticViewContext context) in C:\a\1\s\src\Uno.UI\Diagnostics\DiagnosticViewManager.TView.TState.cs:line 38
at Uno.Diagnostics.UI.DiagnosticView`2.Uno.Diagnostics.UI.IDiagnosticView.GetElement(IDiagnosticViewContext context) in C:\a\1\s\src\Uno.UI\Diagnostics\DiagnosticView.TView.TState.cs:line 45
at Uno.Diagnostics.UI.DiagnosticsOverlay.DiagnosticElement.CreateValue() in C:\a\1\s\src\Uno.UI.Toolkit\Diagnostics\DiagnosticsOverlay.DiagnosticElement.cs:line 28
03-23 17:06:19.434+00:00 E/Uno.Diagnostics.UI.DiagnosticsOverlay+DiagnosticElement: Failed to get preview for Hot Reload. System.InvalidOperationException: Cannot resolve the hot-reload client.
at Uno.UI.HotDesign.Client.HotReload.HotReloadStatusView.Create(IDiagnosticViewContext ctx)
at Uno.UI.HotDesign.Client.HotReload.OnAssemblyLoading.g__ViewFactory|0_0(IDiagnosticViewContext ctx)
at Uno.Diagnostics.UI.DiagnosticViewManager`2.GetView(IDiagnosticViewContext context) in C:\a\1\s\src\Uno.UI\Diagnostics\DiagnosticViewManager.TView.TState.cs:line 38
at Uno.Diagnostics.UI.DiagnosticView`2.Uno.Diagnostics.UI.IDiagnosticView.GetElement(IDiagnosticViewContext context) in C:\a\1\s\src\Uno.UI\Diagnostics\DiagnosticView.TView.TState.cs:line 45
at Uno.Diagnostics.UI.DiagnosticsOverlay.DiagnosticElement.CreateValue() in C:\a\1\s\src\Uno.UI.Toolkit\Diagnostics\DiagnosticsOverlay.DiagnosticElement.cs:line 28
```
### Comments
I have managed to trace back this error to the changes introduced in this commit: https://github.com/Lamparter/Elapsed/commit/c28d7d107590ac87236d8cc61f803e58dcd28bd8
Contributor guide
Assessment
This issue has not been assessed yet.