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

SpecFlow.Tools.MsBuild.Generation.GenerateFeatureFileCodeBehindTask Error in Visual Studio 2022 #2680

Open bonek opened 1 year ago

bonek commented 1 year ago

SpecFlow Version

3.9.74

Which test runner are you using?

xUnit

Test Runner Version Number

It doesn't matter

.NET Implementation

.NET 6.0

Project Format of the SpecFlow project

Sdk-style project format

.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

No response

Issue Description

I prepared own plugin which is extension for xunit provider. Everything works in Rider and when I use dotnet build. But VS 2022 fails. Could you give me information what can I can check ? I used netstandard 2.0 and .net framework 4.6.1 for plugin.

Edit: I created new empty project and effect is the same.

Steps to Reproduce

Link to Repro Project

https://github.com/bonek/specflowpluginerror

SabotageAndi commented 1 year ago

What error are you getting? MSBuild in Visual Studio runs in .NET Framework mode. In Rider and with dotnet it runs in .NET/.NET Core mode.

bonek commented 1 year ago

image