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.22k stars 752 forks source link

SpecFlow.Tools.MsBuild.Generation.3.9.74\build\SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4062: The "SpecFlow.Tools.MsBuild.Generation.GenerateFeatureFileCodeBehindTask" task could not be loaded from the assembly #2670

Open VijayaSree2019 opened 1 year ago

VijayaSree2019 commented 1 year ago

SpecFlow Version

3.9.74

Which test runner are you using?

NUnit

Test Runner Version Number

3.9.74

.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

TFS/VSTS/Azure DevOps – Task – PLEASE SPECIFY THE NAME OF THE TASK

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

Issue Description

I have recently ported my Specflow project from VS2019 to VS2022.

Have also updated to these packages during that process. It compiles well on VS2022 , well after lot of struggle with the Specflow extension, had to uninstall and reinstall the extension as the project references were going messy.

However on our build server (Windows R 2016) using MSBuild 17 , it fails to compile with the following error message..

SpecFlow.Tools.MsBuild.Generation.3.9.74\build\SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4062: The "SpecFlow.Tools.MsBuild.Generation.GenerateFeatureFileCodeBehindTask" task could not be loaded from the assembly

SpecFlow.Tools.MsBuild.Generation.3.9.74\build..\tasks\net461\SpecFlow.Tools.MsBuild.Generation.dll. Could not load file or assembly 'TechTalk.SpecFlow, Version=3.9.0.0, Culture=neutral, PublicKeyToken=0778194805d6db41' or one of its dependencies.

The system cannot find the file specified. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask.

Steps to Reproduce

<?xml version="1.0" encoding="utf-8"?>

and use msbuild 17 from VS Build Tools 2022 to build the solution.

Link to Repro Project

No response

VijayaSree2019 commented 1 year ago

Hi, Could you please look at this issue as I cannot successfully build the test project on the build server.

VijayaSree2019 commented 1 year ago

Any update on the above issue that I am facing. Your response will be much appreciated @SabotageAndi