β dotnet watch
dotnet watch π₯ Hot reload enabled. For a list of supported edits, see https://aka.ms/dotnet/hot-reload.
π‘ Press "Ctrl + R" to restart.
Using launch settings from C:\dev\git\aspire\playground\mongo\Mongo.AppHost\Properties\launchSettings.json...
Building...
info: Aspire.Hosting.DistributedApplication[0]
Aspire version: 9.0.0-dev
info: Aspire.Hosting.DistributedApplication[0]
Distributed application starting.
info: Aspire.Hosting.DistributedApplication[0]
Application host directory is: C:\dev\git\aspire\playground\mongo\Mongo.AppHost
WHAT 0
WHAT 1 ae915c55cdbcbc323e6789e3acccf541
info: Aspire.Hosting.DistributedApplication[0]
Now listening on: https://localhost:15887
dotnet watch β File added: C:\dev\git\aspire\playground\mongo\Mongo.ApiService\33ksid54.uw1~
dotnet watch β File changed: C:\dev\git\aspire\playground\mongo\Mongo.ApiService\Program.cs
dotnet watch β File added: C:\dev\git\aspire\playground\mongo\Mongo.ApiService\33ksid54.uw1~
dotnet watch β File changed: C:\dev\git\aspire\playground\mongo\Mongo.ApiService\Program.cs
dotnet watch π₯ [Mongo.AppHost (net8.0)] Hot reload succeeded.
dotnet watch β File added: C:\dev\git\aspire\playground\mongo\Mongo.ApiService\pbhhq4ge.1u5~
dotnet watch β File changed: C:\dev\git\aspire\playground\mongo\Mongo.ApiService\Program.cs
dotnet watch β File added: C:\dev\git\aspire\playground\mongo\Mongo.ApiService\pbhhq4ge.1u5~
dotnet watch β File changed: C:\dev\git\aspire\playground\mongo\Mongo.ApiService\Program.cs
dotnet watch β³ Waiting for a file to change before restarting dotnet...
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.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, ActiveStatementSpanProvider activeStatementSpanProvider, CancellationToken cancellationToken)
at Microsoft.CodeAnalysis.ExternalAccess.Watch.Api.WatchHotReloadService.GetUpdatesAsync(Solution solution, Func`2 isRunningProject, CancellationToken cancellationToken)
at Microsoft.DotNet.Watcher.Tools.CompilationHandler.HandleFileChangesAsync(Func`3 restartPrompt, CancellationToken cancellationToken)
at Microsoft.DotNet.Watcher.HotReloadDotNetWatcher.WatchAsync(CancellationToken shutdownCancellationToken)
at Microsoft.DotNet.Watcher.HotReloadDotNetWatcher.WatchAsync(CancellationToken shutdownCancellationToken)
at Microsoft.DotNet.Watcher.HotReloadDotNetWatcher.WatchAsync(CancellationToken shutdownCancellationToken)
at Microsoft.DotNet.Watcher.HotReloadDotNetWatcher.WatchAsync(CancellationToken shutdownCancellationToken)
at Microsoft.DotNet.Watcher.HotReloadDotNetWatcher.WatchAsync(CancellationToken shutdownCancellationToken)
at Microsoft.DotNet.Watcher.Program.RunAsync()
dotnet watch β An unexpected error occurred
This reproduces consistently after 3-4 edits