Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collection was modified #586

Open
seesharper opened this issue Jan 27, 2023 · 0 comments
Open

Collection was modified #586

seesharper opened this issue Jan 27, 2023 · 0 comments

Comments

@seesharper
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant