-
Notifications
You must be signed in to change notification settings - Fork 85
[ScenarioDependencies] in a project without StepBindings gives 'No method marked with [ScenarioDependencies] attribute found' (Reqnroll.Microsoft.Extensions.DependencyInjection) #477
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
Comments
I will try to fix this. I think we need Would be great if we could make a pre-release package on nuget then. |
LOL I linked to autofac (was on mobile), so I guess that is an issue on autofac also. update: that was dead code, fixed in #480 |
@Salgat I think you have this issue. Work around: add a fake binding to the assembly with Update: not sure if this is the same issue, as the code I checked in the autofac plugin was deadcode. So we still need a new github issue for that. |
We don't usually do pre-releases on nuget.org, because of the additional maintenance overhead, but every build contains a set of prerelease packages that can be downloaded and used from a folder source or uploaded to a private feed. |
Ok that's also OK 👍 |
Released in 2.4.0: https://github.com/orgs/reqnroll/discussions/515 |
Reqnroll Version
Reqnroll.Microsoft.Extensions.DependencyInjection 2.3.0
Which test runner are you using?
NUnit
.NET Implementation
.NET 8.0
Test Execution Method
ReSharper Test Runner
Content of reqnroll.json configuration file
Issue Description
[ScenarioDependencies]
in a project without stepdefinitions (e.g.[Given]
,[When]
) can't find the[ScenarioDependencies]
methodThis is with Microsoft.Extensions.DependencyInjection, I haven't checked the other plugins (autofac etc)
Steps to Reproduce
Given in reqnroll.json:
In Project1 are stepdefinitions. In Project2 is the
[ScenarioDependencies]
Then the
[ScenarioDependencies]
can't be found:The issue is in
https://github.com/reqnroll/Reqnroll/blob/966d1c372bdef843d7a2e3ecd267e07722351d80/Plugins/Reqnroll.Autofac.ReqnrollPlugin/BindingRegistryExtensions.cs#L20C2-L25C10
called by
Reqnroll/Plugins/Reqnroll.Microsoft.Extensions.DependencyInjection.ReqnrollPlugin/ServiceCollectionFinder.cs
Line 27 in 966d1c3
as this will get the assemblies from the stepdefinitions, while I assumed this would loop the assemblies from reqnroll.json
Link to Repro Project
No response
related #474
The text was updated successfully, but these errors were encountered: