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

Resolving cross-wired transient service outside of scope throws too generic exception #713

dotnetjunkie opened this issue May 16, 2019 · 0 comments


None yet
1 participant
Copy link

commented May 16, 2019

Steps to reproduce

var container = new Container();

var services = new ServiceCollection()
    .AddTransient<IFrameworkService, FrameworkComponent>()
var provider = services
    .BuildServiceProvider(validateScopes: true)



// Throws exception

Thrown exception:

You are trying to resolve a cross-wired service, but are doing so outside the context of an active (Async Scoped) scope. To be able to resolve this service the operation must run in the context of such scope. Please see for more information about how to manage scopes.

Expected behavior

The exception should contain information about the actual cross-wired framework service that is resolved.

@dotnetjunkie dotnetjunkie added this to the Backlog milestone May 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.