SpecFlow is not working with any windows application using .net 5

Created on 15 Mar 2021  Â·  14Comments  Â·  Source: SpecFlowOSS/SpecFlow

SpecFlow Version:

  • [ x] 3.7
  • [ ] 3.6
  • [ ] 3.5
  • [ ] 3.4
  • [ ] 3.3
  • [ ] 3.1
  • [ ] 3.0
  • [ ] 2.4
  • [ ] 2.3
  • [ ] 2.2
  • [ ] 2.1
  • [ ] 2.0
  • [ ] 1.9

Used Test Runner

  • [ x] SpecFlow+Runner
  • [ ] MSTest
  • [ ] NUnit
  • [ ] Xunit


Version number:

Project Format of the SpecFlow project

  • [ ] Classic project format using packages.config
  • [ ] Classic project format using <PackageReference> tags
  • [ x] Sdk-style project format

.feature.cs files are generated using

  • [ ] SpecFlow.Tools.MsBuild.Generation NuGet package
  • [ x] SpecFlowSingleFileGenerator custom tool

Visual Studio Version

  • [ x] VS 2019
  • [ ] VS 2017

Enable SpecFlowSingleFileGenerator Custom Tool option in Visual Studio extension settings

  • [x ] Enabled
  • [ ] Disabled

Are the latest Visual Studio updates installed?

  • [x ] Yes
  • [ ] No, I use Visual Studio version <Major>.<Minor>.<Patch>

.NET Implementation:

  • [ x] .NET 5.0
  • [ ] .NET Core 3.1
  • [ ] .NET Core 2.1
  • [ ] >= .NET Framework 4.5
  • [ ] before .NET Framework 4.5

Test Execution Method:

  • [ x] Visual Studio Test Explorer
  • [ x] TFS/VSTS/Azure DevOps – Task – PLEASE SPECIFY THE NAME OF THE TASK
  • [ ] Command line – PLEASE SPECIFY THE FULL COMMAND LINE

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

Severity    Code    Description Project File    Line    Suppression State
Error   MSB3030 Could not copy the file "C:\Users\******\.nuget\packages\specrun.runner\3.7.3\tools\net5.0-windows\TechTalk.SpecRun.Framework.dll" because it was not found.    NoreenBackEnd.Core.Specs.Test   C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets    4919    
Error   MSB3030 Could not copy the file "C:\Users\******\.nuget\packages\specrun.runner\3.7.3\tools\net5.0-windows\TechTalk.SpecFlow.Plus.RPC.dll" because it was not found.    NoreenBackEnd.Core.Specs.Test   C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets    4919    
Error   MSB3030 Could not copy the file "C:\Users\******\.nuget\packages\specrun.runner\3.7.3\tools\net5.0-windows\SpecFlow.Plus.Shared.dll" because it was not found.  NoreenBackEnd.Core.Specs.Test   C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets    4919    

Issue Description


it is not working with any windows project using .net 5 and net5.0-windows
or net5.0-windows7.0

Steps to Reproduce


create windows forms project target .net5 then create SpecFlow project using .net 5 then reference the windows forms project and try to compile

Repro Project

Bug SpecFlow+ easy medium

All 14 comments

Ah, the net5.0-windows TFM is making here problems.

Ah, the net5.0-windows TFM is making here problems.

I don't understand what do you mean

In our MSBuild code, we don't check the special TFMs that came with .NET 5. The path to copy should be specrun.runner\3.7.3\tools\net5.0\TechTalk.SpecRun.Framework.dll and not specrun.runner\3.7.3\tools\net5.0-windows\TechTalk.SpecRun.Framework.dll

When it will be solved?
is there any workaround to make it work with net5.0-windows ?

We know about the issue since 2 hours, so no idea when it will be fixed. I will put it on the backlog for next iteration (starts next Tuesday).

If you want to stay with the SpecFlow+ Runner, you would need to change to the net5.0 TFM, but no idea if your application is then still working.
Alternative you can switch to another test runner like xUnit, NUnit or MSTest.

I would like to know when you will solve this issue

It is on our backlog, but we are a small team with a lot of tasks.
Until we fixed this, I would suggest using another test runner like xUnit.
Or do you need a special feature of the SpecFlow+ Runner for your project?

yes exactly we need a special feature of the SpecFlow+ Runner for our project

@muhammadyehia Which one?

the report generated after run the specs

Hey @muhammadyehia, we fixed this issue, will be in the next release.

thanks

thanks it works

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.

Was this page helpful?
0 / 5 - 0 ratings