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

System.Configuration.ConfigurationManager not found with .Net 4.8 #419

Open
grueni opened this issue Jan 25, 2025 · 0 comments
Open

System.Configuration.ConfigurationManager not found with .Net 4.8 #419

grueni opened this issue Jan 25, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@grueni
Copy link

grueni commented Jan 25, 2025

Reqnroll Version

2.2.1

Which test runner are you using?

NUnit

Test Runner Version Number

4.6.0

.NET Implementation

.NET Framework 4.6.2 or later

Test Execution Method

Visual Studio Test Explorer

Content of reqnroll.json configuration file

{
"$schema": "https://schemas.reqnroll.net/reqnroll-config-latest.json",

"bindingAssemblies": [
{
"assembly": "Specs"
}
]
}

Issue Description

I get the error message System.IO.FileNotFoundException: Could not load file or assembly 'System.Configuration.ConfigurationManager when starting tests.
The tests work without any problems.

The problem is located in Reqnroll.SpecFlowCompatibility.ReqnrollPlugin.csproj.
I guess this reference is the origin of the problem.

The reference is only needed for .net core but not for .net framework.
Your test for the plugin uses .net core 8.0 and so you don't detect the problem.

Steps to Reproduce

I followed the instructions to replace Specflow with Reqrnoll.
The Specs project uses .net framework 4.8.
When I

  • use Reqnroll.SpecFlowCompatibility.ReqnrollPlugin,
  • build the solution,
  • navigate to a test
  • run the test
    then I get the following error:

Info: OnActivityStarted: Starting Visual Studio Extension...
Info: CreateProjectScope: Initializing project: Specs
Info: OnSettingsInitialized: Project settings initialized: .NETFramework,Version=v4.8,Reqnroll:2.2.1
Warning: AndDiscoveryProviderSucceed: Error during binding discovery.
Command executed:
D:\Workspaces\AG\DCI\gitlab\dci2\DCI\Specs\bin\Debug> C:\Program Files\dotnet\dotnet.exe exec c:\users\sa-grueninger\appdata\local\microsoft\visualstudio\17.0_8fb504e1\extensions\1bqgoquq.av5\Connectors\Reqnroll-Generic-net8.0\reqnroll-vs.dll discovery D:\Workspaces\AG\DCI\gitlab\dci2\DCI\Specs\bin\Debug\Specs.dll D:\Workspaces\AG\DCI\gitlab\dci2\DCI\Specs\reqnroll.json
Exit code: 0
Message:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. Das System kann die angegebene Datei nicht finden.
File name: 'System.Configuration.ConfigurationManager, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
at Reqnroll.SpecFlowCompatibility.ReqnrollPlugin.RuntimePlugin.<>c.b__0_0(Object _, ConfigurationDefaultsEventArgs args)

Link to Repro Project

No response

@grueni grueni added the bug Something isn't working label Jan 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant