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

Autofac.Core.RegisComponentNotRegisteredException : The requested service 'Reqnroll.FeatureContext' has not been registered. #6

Open
Antwane opened this issue Dec 3, 2024 · 0 comments

Comments

@Antwane
Copy link

Antwane commented Dec 3, 2024

Hello there, I recently started a new project with Reqnroll & Autofac and I wanted to include ReportPortal to it. The problem is as soon as I added the nuget to the project, it stops working. I get the following exception

Autofac.Core.Registration.ComponentNotRegisteredException : The requested service 'Reqnroll.FeatureContext' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.

Steps to Reproduce:

  1. Create a new project using Reqnroll template
  2. Add Reqnroll.Autofac 2.2.1
  3. Add ReportPortal.Reqnroll 1.2.0
  4. Add a GlobalHooks.cs file for your dependency injection with 2 sections: [GlobalDependencies] and [ScenarioDependencies]
  5. Debug "Add two numbers" test case, it fail with the above exception, it won't reach the test.

Thanks,

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