You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on my program I was working on modifying some blazor components, nothing fancy: just copying a blazor component, modifying the name, changeing the type of a parameter.
When I looked at the dotnet watch log it has crashed.
dotnet watch ❌ System.ArgumentException: Cannot find the old value (Parameter 'oldValue')
at System.Collections.Immutable.ImmutableArray`1.Replace(T oldValue, T newValue, IEqualityComparer`1 equalityComparer)
at System.Collections.Immutable.ImmutableArray`1.Replace(T oldValue, T newValue)
at Microsoft.CodeAnalysis.GeneratorDriver.ReplaceAdditionalText(AdditionalText oldText, AdditionalText newText)
at Microsoft.CodeAnalysis.SolutionCompilationState.TranslationAction.TouchAdditionalDocumentsAction.TransformGeneratorDriver(GeneratorDriver generatorDriver)
at Microsoft.CodeAnalysis.SolutionCompilationState.RegularCompilationTracker.<>c__DisplayClass24_0.<<GetOrBuildFinalStateAsync>g__ApplyFirstTransformationAsync|6>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.CodeAnalysis.SolutionCompilationState.RegularCompilationTracker.<>c__DisplayClass24_0.<<GetOrBuildFinalStateAsync>g__CollapseInProgressStateAsync|2>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.CodeAnalysis.SolutionCompilationState.RegularCompilationTracker.<>c__DisplayClass24_0.<<GetOrBuildFinalStateAsync>g__BuildFinalStateAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.CodeAnalysis.SolutionCompilationState.RegularCompilationTracker.GetOrBuildFinalStateAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.SolutionCompilationState.RegularCompilationTracker.GetCompilationSlowAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.SolutionCompilationState.GetMetadataReferenceAsync(ICompilationTracker tracker, ProjectState fromProject, ProjectReference projectReference, Boolean includeCrossLanguage, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.SolutionCompilationState.RegularCompilationTracker.<>c__DisplayClass24_0.<<GetOrBuildFinalStateAsync>g__FinalizeCompilationWorkerAsync|4>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.CodeAnalysis.SolutionCompilationState.RegularCompilationTracker.<>c__DisplayClass24_0.<<GetOrBuildFinalStateAsync>g__FinalizeCompilationAsync|3>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.CodeAnalysis.SolutionCompilationState.RegularCompilationTracker.<>c__DisplayClass24_0.<<GetOrBuildFinalStateAsync>g__BuildFinalStateAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.CodeAnalysis.SolutionCompilationState.RegularCompilationTracker.GetOrBuildFinalStateAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.SolutionCompilationState.RegularCompilationTracker.GetCompilationSlowAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.SolutionCompilationState.GetMetadataReferenceAsync(ICompilationTracker tracker, ProjectState fromProject, ProjectReference projectReference, Boolean includeCrossLanguage, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.SolutionCompilationState.RegularCompilationTracker.<>c__DisplayClass24_0.<<GetOrBuildFinalStateAsync>g__FinalizeCompilationWorkerAsync|4>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.CodeAnalysis.SolutionCompilationState.RegularCompilationTracker.<>c__DisplayClass24_0.<<GetOrBuildFinalStateAsync>g__FinalizeCompilationAsync|3>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.CodeAnalysis.SolutionCompilationState.RegularCompilationTracker.<>c__DisplayClass24_0.<<GetOrBuildFinalStateAsync>g__BuildFinalStateAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.CodeAnalysis.SolutionCompilationState.RegularCompilationTracker.GetOrBuildFinalStateAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.SolutionCompilationState.RegularCompilationTracker.GetCompilationSlowAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.SolutionCompilationState.GetMetadataReferenceAsync(ICompilationTracker tracker, ProjectState fromProject, ProjectReference projectReference, Boolean includeCrossLanguage, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.SolutionCompilationState.RegularCompilationTracker.<>c__DisplayClass24_0.<<GetOrBuildFinalStateAsync>g__FinalizeCompilationWorkerAsync|4>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.CodeAnalysis.SolutionCompilationState.RegularCompilationTracker.<>c__DisplayClass24_0.<<GetOrBuildFinalStateAsync>g__FinalizeCompilationAsync|3>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.CodeAnalysis.SolutionCompilationState.RegularCompilationTracker.<>c__DisplayClass24_0.<<GetOrBuildFinalStateAsync>g__BuildFinalStateAsync|0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.CodeAnalysis.SolutionCompilationState.RegularCompilationTracker.GetOrBuildFinalStateAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.SolutionCompilationState.RegularCompilationTracker.GetSourceGeneratorDiagnosticsAsync(SolutionCompilationState compilationState, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.EditAndContinue.EditSession.GetSourceGeneratedDocumentStatesAsync(Project project, ArrayBuilder`1 diagnostics, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.EditAndContinue.EditSession.PopulateChangedAndAddedDocumentsAsync(Project oldProject, Project newProject, ArrayBuilder`1 changedOrAddedDocuments, ArrayBuilder`1 diagnostics, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.EditAndContinue.EditSession.EmitSolutionUpdateAsync(Solution solution, ActiveStatementSpanProvider solutionActiveStatementSpanProvider, UpdateId updateId, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.EditAndContinue.DebuggingSession.EmitSolutionUpdateAsync(Solution solution, IImmutableSet`1 runningProjects, ActiveStatementSpanProvider activeStatementSpanProvider, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.ExternalAccess.Watch.Api.WatchHotReloadService.GetUpdatesAsync(Solution solution, IImmutableSet`1 runningProjects, CancellationToken cancellationToken)
at Microsoft.DotNet.Watch.CompilationHandler.HandleFileChangesAsync(Func`3 restartPrompt, CancellationToken cancellationToken)
at Microsoft.DotNet.Watch.HotReloadDotNetWatcher.WatchAsync(CancellationToken shutdownCancellationToken)
at Microsoft.DotNet.Watch.HotReloadDotNetWatcher.WatchAsync(CancellationToken shutdownCancellationToken)
at Microsoft.DotNet.Watch.HotReloadDotNetWatcher.WatchAsync(CancellationToken shutdownCancellationToken)
at Microsoft.DotNet.Watch.Program.RunAsync()
dotnet watch ❌ An unexpected error occurred
@tmat@jasonmalinowski Looks like the IDE/watch is attempting to replace an additional document that the generator doesn't know about, so something has gotten out of sync.
Describe the bug
While working on my program I was working on modifying some blazor components, nothing fancy: just copying a blazor component, modifying the name, changeing the type of a parameter.
When I looked at the dotnet watch log it has crashed.
dotnet info:
Exceptions (if any)
Further technical details
dotnet --info
The text was updated successfully, but these errors were encountered: