Oliver
Oliver
CC#
Created by Oliver on 11/14/2024 in #help
✅ Winform with Blazor -> HotReload Slow
We've now started migrating our project to .NET 9, and we're experiencing issues with hot reload. Here's our setup: We have a Windows Forms application that serves as a host. The host contains a single Blazor WebView component which runs our main application. When making simple changes (like adjusting a div's margin (.razor file) or changing something in a cs file (non blazor)), it takes approximately 30 seconds for the hot reload to apply. In the dotnet watch console window, we're seeing warnings and two file change notifications for each single change. Additionally, we're noticing that temporary files (marked with a ~ at the end) created by Rider IDE are being included in these changes. Can anyone explain why we're experiencing these slow reload times and multiple file change detections? dotnet watch ⌚ File added: C:\Users\Me\source\XXX\Common\XXX.Ui.Base\Components\Data\DetailPageContainer.razor~ dotnet watch ⌚ File updated: C:\Users\Me\source\XXX\Common\XXX.Ui.Base\Components\Data\DetailPageContainer.razor dotnet watch ⌚ File added: C:\Users\Me\source\XXX\Common\XXX.Ui.Base\Components\Data\DetailPageContainer.razor~ dotnet watch ⌚ File updated: C:\Users\Me\source\XXX\Common\XXX.Ui.Base\Components\Data\DetailPageContainer.razor dotnet watch ⚠ [XXX (net9.0-windows)] Type 'System.Windows.Forms.WinFormsMetadataUpdateHandler' has method 'Void UpdateApplication()' that does not match the required signature. dotnet watch ⚠ [XXX (net9.0-windows)] Expected to find a static method 'ClearCache' or 'UpdateApplication' on type 'System.Windows.Forms.WinFormsMetadataUpdateHandler, System.Windows.Forms' but neither exists. dotnet watch ⚠ [XXX (net9.0-windows)] Expected to find a static method 'ClearCache' or 'UpdateApplication' on type 'Microsoft.AspNetCore.Components.WebView.StaticContentHotReloadManager, Microsoft.AspNetCore.Components.WebView.WindowsForms' but neither exists. dotnet watch 🔥 [XXX (net9.0-windows)] Hot reload succeeded.
6 replies