Hot reload fails when editing CSHTML files. I occasionally get errors when editing Blazor filese also. Hot reload doesn't seem to trigger at all for .CS files, but that might be another issue entirely.
2026-07-03 09:35:22.817 [info] Rude edit ChangingReloadableTypeNotSupportedByRuntime:8875 'C:\Projects\Rubber-Monkey\Source\RubberMonkey.Sales.Web\obj\Debug\net10.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Views/Shared/_Layout_cshtml.g.cs' line 367: 'public async override global::System.Threading.Tasks.Task ExecuteAsync()'
2026-07-03 09:35:32.270 [info] ApplyChangesAsync called.
2026-07-03 09:35:32.273 [info] Checking for code updates...
2026-07-03 09:35:32.284 [info] Emitting solution update 11.1 for solution 'C:\Projects\Rubber-Monkey\Source\RubberMonkey.Sales.slnx'
2026-07-03 09:35:32.947 [info] Found 1 potentially changed, 0 deleted document(s) in project 'C:\Projects\Rubber-Monkey\Source\RubberMonkey.Sales.Web\RubberMonkey.Sales.Web.csproj'
2026-07-03 09:35:32.957 [info] Rude edit ChangingReloadableTypeNotSupportedByRuntime:8875 'C:\Projects\Rubber-Monkey\Source\RubberMonkey.Sales.Web\obj\Debug\net10.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Views/Shared/_Layout_cshtml.g.cs' line 367: 'public async override global::System.Threading.Tasks.Task ExecuteAsync()'
2026-07-03 09:35:32.962 [info] Document changed, added, or deleted: 'C:\Projects\Rubber-Monkey\Source\RubberMonkey.Sales.Web\obj\Debug\net10.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Views/Shared/_Layout_cshtml.g.cs'
2026-07-03 09:35:32.969 [info] Project summary for 'C:\Projects\Rubber-Monkey\Source\RubberMonkey.Sales.Web\RubberMonkey.Sales.Web.csproj': InvalidChanges
2026-07-03 09:35:32.991 [error] ❌ Exception while emitting update: StreamJsonRpc.ConnectionLostException: The JSON-RPC connection with the remote party was lost before the request could complete.
at StreamJsonRpc.JsonRpc.InvokeCoreAsync(JsonRpcRequest request, Type expectedResultType, CancellationToken cancellationToken)
at StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](RequestId id, String targetName, IReadOnlyList`1 arguments, IReadOnlyList`1 positionalArgumentDeclaredTypes, IReadOnlyDictionary`2 namedArgumentDeclaredTypes, CancellationToken cancellationToken, Boolean isParameterObject)
at Microsoft.CodeAnalysis.BrokeredServices.BrokeredServiceProxy`1.InvokeAsync[TArgs,TResult](Func`4 operation, TArgs args, CancellationToken cancellationToken) in /_/src/Workspaces/Remote/Core/ServiceBrokerExtensions.cs:line 49
at Microsoft.CodeAnalysis.EditAndContinue.ManagedHotReloadServiceProxy.GetAvailabilityAsync(Guid module, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.EditAndContinue.EditSession.ReportModuleDiagnosticsAsync(Guid mvid, Project oldProject, Project newProject, ImmutableArray`1 documentAnalyses, ArrayBuilder`1 diagnostics, CancellationToken cancellationToken) in /_/src/Features/Core/Portable/EditAndContinue/EditSession.cs:line 157
at Microsoft.CodeAnalysis.EditAndContinue.EditSession.EmitSolutionUpdateAsync(Solution solution, ActiveStatementSpanProvider solutionActiveStatementSpanProvider, UpdateId updateId, ImmutableDictionary`2 runningProjects, CancellationToken cancellationToken) in /_/src/Features/Core/Portable/EditAndContinue/EditSession.cs:line 1299
2026-07-03 09:35:33.189 [error] ❌ C:\Projects\Rubber-Monkey\Source\RubberMonkey.Sales.EntityFramework\RubberMonkey.Sales.EntityFramework.csproj (line 1): error ENC1002: Cannot apply changes -- unexpected error: 'Cannot apply changes -- unexpected error: '''
2026-07-03 09:35:33.220 [info] Code changes could not be applied. Restarting the application is required.
2026-07-03 09:35:33.226 [info] Hot Reload result: {"result":2,"projectsToRestart":[],"projectsToRebuild":[],"errorDescriptions":["Cannot apply changes -- unexpected error: 'Cannot apply changes -- unexpected error: '''"],"projectInstancesToRebuild":[],"projectInstancesToRestart":[]}
2026-07-03 09:35:33.226 [info] Hot Reload can't automatically apply your changes. The app needs to be rebuilt to apply updates.
Type: Bug
Issue Description
Hot reload fails when editing CSHTML files. I occasionally get errors when editing Blazor filese also. Hot reload doesn't seem to trigger at all for .CS files, but that might be another issue entirely.
Looking in the hot reload logs the root cause seems to be
Rude edit ChangingReloadableTypeNotSupportedByRuntime, which is followed byStreamJsonRpc.ConnectionLostExceptionand thenerror ENC1002: Cannot apply changes -- unexpected error: 'Cannot apply changes -- unexpected error: '''Extension version: 2.145.15
VS Code version: Code 1.127.0 (4fe60c8b1cdac1c4c174f2fb180d0d758272d713, 2026-06-30T10:52:33+02:00)
OS version: Windows_NT x64 10.0.26220
Modes:
System Info
GPU0: VENDOR= 0x8086, DEVICE=0x9bc4 [Intel(R) UHD Graphics], DRIVER_VENDOR=Intel, DRIVER_VERSION=31.0.101.2140 ACTIVE
GPU1: VENDOR= 0x10de, DEVICE=0x1fb8 [NVIDIA Quadro T2000 with Max-Q Design], DRIVER_VERSION=32.0.15.9595
GPU2: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.8680
Machine model name:
Machine model version:
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgpu: enabled
webnn: disabled_off
A/B Experiments