Specflow.Autofac nuget package search scope?
SpecFlow Version
3.5.14
Which test runner are you using?
MSTest
Test Runner Version Number
3.5.14
.NET Implementation
equal or greater .NET Framework 4.6.1
Project Format of the SpecFlow project
Classic project format using packages.config
.feature.cs files are generated using
SpecFlow.Tools.MsBuild.Generation NuGet package
Test Execution Method
Visual Studio Test Explorer
SpecFlow Section in app.config or content of specflow.json
Issue Description
This question is related to the Specflow.Autofac nuget package.
After compilation we place all the binaries of our test projects (~30) within a shared bin folder (this cannot change unfortunately). After installing specflow.autofac nuget package in a single project a binary SpecFlow.Autofac.SpecFlowPlugin was placed in the shared bin folder as well (no problem until here).
Since the package was only installed in 1 project hence I provided the [ScenarioDependencies] function within this single project as well. But all other projects now have failing tests. Reason is Specflow.Autofac is expecting all the projects to have a function with [ScenarioDependencies] attribute (this is normally the entry point for specflow.autufac).
Why does it try to find the ScenarioDependencies function in all the projects when the nuget package was only installed in a single project? Any leads would be appreciated. Thanks
Steps to Reproduce
- Create multiple projects.
- Ensure that binaries are placed within same shared bin folder after both projects are compiled.
- Install Specflow.autofac in one of them.
- Provide [ScenarioDependencies] in the project where you installed the nuget package.
- Try running test from the other project.
Link to Repro Project
No response