SpecFlowOSS / SpecFlow

#1 .NET BDD Framework. SpecFlow automates your testing & works with your existing code. Find Bugs before they happen. Behavior Driven Development helps developers, testers, and business representatives to get a better understanding of their collaboration
https://www.specflow.org/
Other
2.24k stars 754 forks source link

SpecRun.specflow is not working against standard .net 2.0 #2523

Closed anallapati closed 2 years ago

anallapati commented 2 years ago

SpecFlow Version

SpecRun.Specflow 3.9.7

Which test runner are you using?

SpecFlow+ Runner

Test Runner Version Number

3.9.7

.NET Implementation

.NET Core 2.0

Project Format of the SpecFlow project

Classic project format using packages.config

.feature.cs files are generated using

SpecFlowSingleFileGenerator custom tool

Test Execution Method

Visual Studio Test Explorer

SpecFlow Section in app.config or content of specflow.json

No response

Issue Description

SpecRun.specflow is not working on .net 2.0 standard

Steps to Reproduce

Create a solution with standard .net 2.0 and import SpecRun.Specflow nuget package and after the build the solution it is gives the error Severity Code Description Project File Line Suppression State Error MSB3030 Could not copy the file "C:\Users\username.nuget\packages\specrun.runner\3.9.7\tools\SpecFlow.Plus.Shared.dll" because it was not found. XXXXXX C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets 4919

Link to Repro Project

No response

SabotageAndi commented 2 years ago

.NET Standard is an API definition and not a framework. .NET Framework, .NET Core and .NET implement this standard, but they can have different behaviors. You have to define exactly which Target Framework you want your test to run and so having a .NET Standard test project is not possible with SpecFlow and SpecFlow+ Runner.

The xUnit people explained it very well here: https://xunit.net/docs/why-no-netstandard and we share the same opinion on this.

github-actions[bot] commented 2 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.