2026.1.2 crashing in VS 2026 in .razor files?
I get a long stack of these errors … not sure of the trigger … all I tried to do was Ctrl + Shift + / (/* and */) to set a comment block (in my razor file :

Show Stack Trace is below:
StreamJsonRpc.RemoteInvocationException: Razor source generator did not produce a host output for project 'Toms': warning CS8785: Generator 'RazorSourceGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'ArgumentException' with message 'The hintName 'Components/Booking/BookingEquipmentCommodityEditView_razor.g.cs' of the added source file must be unique within a generator. (Parameter 'hintName')'.
System.ArgumentException: The hintName 'Components/Booking/BookingEquipmentCommodityEditView_razor.g.cs' of the added source file must be unique within a generator. (Parameter 'hintName')
at Microsoft.CodeAnalysis.AdditionalSourcesCollection.Add(String hintName, SourceText source)
at Microsoft.CodeAnalysis.SourceOutputNode`1.AppendOutputs(IncrementalExecutionContext context, CancellationToken cancellationToken)
-----
at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__177`1.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 System.Threading.Tasks.ValueTask`1.get_Result()
at Microsoft.CodeAnalysis.Remote.BrokeredServiceConnection`1.<TryInvokeAsync>d__18`1.MoveNext()
RPC server exception:
System.InvalidOperationException: Razor source generator did not produce a host output for project 'Toms': warning CS8785: Generator 'RazorSourceGenerator' failed to generate source. It will not contribute to the output and compilation errors may occur as a result. Exception was of type 'ArgumentException' with message 'The hintName 'Components/Booking/BookingEquipmentCommodityEditView_razor.g.cs' of the added source file must be unique within a generator. (Parameter 'hintName')'.
System.ArgumentException: The hintName 'Components/Booking/BookingEquipmentCommodityEditView_razor.g.cs' of the added source file must be unique within a generator. (Parameter 'hintName')
at Microsoft.CodeAnalysis.AdditionalSourcesCollection.Add(String hintName, SourceText source)
at Microsoft.CodeAnalysis.SourceOutputNode`1.AppendOutputs(IncrementalExecutionContext context, CancellationToken cancellationToken)
-----
at Microsoft.CodeAnalysis.Remote.Razor.ProjectSystem.GeneratorRunResult.CreateAsync(Boolean throwIfNotFound, Project project, RemoteSnapshotManager snapshotManager, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Remote.Razor.ProjectSystem.RemoteProjectSnapshot.GetRequiredCodeDocumentAsync(IDocumentSnapshot documentSnapshot, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Remote.Razor.ProjectSystem.RemoteDocumentSnapshot.GetGeneratedOutputAsync(CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Razor.ProjectSystem.DocumentContext.<GetCodeDocumentAsync>g__GetCodeDocumentCoreAsync|19_0(CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Remote.Razor.RemoteHoverService.GetHoverAsync(RemoteDocumentContext context, Position position, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.<>c__DisplayClass7_0`1.<<RunWithSolutionAsync>g__ProcessSolutionAsync|1>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.RunWithSolutionAsync[T](AssetProvider assetProvider, Checksum solutionChecksum, Boolean updatePrimaryBranch, Func`2 implementation, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Remote.RemoteWorkspace.RunWithSolutionAsync[T](AssetProvider assetProvider, Checksum solutionChecksum, Boolean updatePrimaryBranch, Func`2 implementation, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.Remote.RemoteWorkspaceManager.RunServiceAsync[T](ServiceBrokerClient client, Checksum solutionChecksum, Func`2 implementation, CancellationToken cancellationToken)
Please sign in to leave a comment.
Hello Robains
Thank you for submitting this issue. From the first glance, it seems that your problem is related to Microsoft assemblies and it is not necessarily connected to ReSharper.
Could you try to disable ReSharper and check if the issue persists without it? It can be done with Tools | Options | ReSharper | General | Suspend
In case disabling ReSharper helps to solve it (so it can be connected to the behavior), please enable it back and:
1. Reproduce the issue and get ReSharper log with (Extensions) | ReSharper | Help | Collect Logs.
2. Share the log alongside a minimal sample project reproducing the issue on your side
3. Describe the steps to follow with the solution to trigger the issue
4. Submit the details above using the Feedback Center dialog or use the Issue Tracker