Skip to content

Collection was modified #586

Description

@seesharper

Observed in a asp.net app

[21:52:57] :	 [Step 1/1]    System.InvalidOperationException : Collection was modified; enumeration operation may not execute.
[21:52:57] :	 [Step 1/1]   Stack Trace:
[21:52:57] :	 [Step 1/1]      at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
[21:52:57] :	 [Step 1/1]    at Microsoft.Extensions.Options.OptionsMonitor`1.Dispose()
[21:52:57] :	 [Step 1/1]    at LightInject.Scope.Dispose()
[21:52:57] :	 [Step 1/1]    at LightInject.Microsoft.DependencyInjection.LightInjectServiceProvider.Dispose()
[21:52:57] :	 [Step 1/1]    at Microsoft.Extensions.Hosting.Internal.Host.<DisposeAsync>g__DisposeAsync|16_0(Object o)
[21:52:57] :	 [Step 1/1]    at Microsoft.Extensions.Hosting.Internal.Host.DisposeAsync()
[21:52:57] :	 [Step 1/1]    at Microsoft.Extensions.Hosting.Internal.Host.Dispose()
[21:52:57] :	 [Step 1/1]    at Microsoft.AspNetCore.Mvc.Testing.DeferredHostBuilder.DeferredHost.Dispose()
[21:52:57] :	 [Step 1/1]    at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.DisposeAsync()
[21:52:57] :	 [Step 1/1]    at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.Dispose(Boolean disposing)
[21:52:57] :	 [Step 1/1]    at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.Dispose()

Possibly related

https://stackoverflow.com/questions/9925083/collection-was-modified-enumeration-operation-may-not-execute

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions