-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
area-EnC-monoHot Reload for WebAssembly, iOS/Android, etcHot Reload for WebAssembly, iOS/Android, etc
Milestone
Description
This issue has been moved from a ticket on Developer Community.
I got the following error when trying to hot reload a change to my Blazor WebAssemlby app:
20:46 51.50 BlazorApp14.Server (Web assembly): Sending updates to running application
20:46 51.56 BlazorApp14.Server (Web assembly): [Error] Applying updates failed:
20:46 51.56 BlazorApp14.Server (Web assembly): [Error] Applying updates failed: The following error occurred when trying to apply your edits to the running application.
20:46 51.57 Exception thrown for Apply Code Updates: 0x80131500 - The following error occurred when trying to apply your edits to the running application. The following error occurred when trying to apply your edits to the running application.
20:46 51.57 Stack trace for WebToolsException:
at Microsoft.WebTools.ProjectSystem.Components.HotReload.ProjectHotReloadSession.<ApplyUpdatesAsync>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Debugger.Shared.Utilities.LoggerExtensions.<LogOnExceptionAsync>d__3.MoveNext()
20:46 51.57 An unexpected error has occurred, any pending updates have been discarded.
Repro steps:
- Create an ASP.NET Core hosted Blazor WebAssembly app using .NET 7
- Add Shared/MyLayout.razor to the Client project
@inherits LayoutComponentBase
<h1>MyLayout</h1>
<main>
@Body
</main>
- Update Index.razor to include
@layout MyLayoutjust below the@pagedirective - Run the app without debugging
- Remove the
@layout MyLayoutdirective from Index.Razor - Hot reload the change to the running app
Original Comments
Feedback Bot on 7/23/2023, 05:58 PM:
(private comment, text removed)
Feedback Bot on 7/24/2023, 01:36 AM:
(private comment, text removed)
Original Solutions
(no solutions)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-EnC-monoHot Reload for WebAssembly, iOS/Android, etcHot Reload for WebAssembly, iOS/Android, etc