Closed fionnaos closed 4 years ago
If you use dotnet build
the process is running in .NET Core. SpecFlow 2.4 doesn't support .NET Core.
You have to use SpecFlow 3 or build with msbuild
from Visual Studio 2017. The msbuild error from you is I think, because you are using MSBuild from VS 2015.
If you use
dotnet build
the process is running in .NET Core. SpecFlow 2.4 doesn't support .NET Core.
Okay, I have been using dotnet build in the CI servers for almost a year with Specflow 2.4.1. Could this then be documented in https://specflow.org/documentation/Generate-Tests-from-MsBuild/ that this GenerateAll task specifically won't work with dotnet and Specflow versions less than 3?
You have to use SpecFlow 3 or build with
msbuild
from Visual Studio 2017. The msbuild error from you is I think, because you are using MSBuild from VS 2015.
Thanks, that helped! I was using MSBuild from the .NET Framework installation, not from Visual Studio build tools.
Closed because resolved
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.
SpecFlow Version:
Used Test Runner
Project Format of the SpecFlow project
packages.config
<PackageReference>
tags.feature.cs files are generated using
SpecFlow.Tools.MsBuild.Generation
NuGet packageSpecFlowSingleFileGenerator
custom toolVisual Studio Version
N/A - issue building from command line only
Enable SpecFlowSingleFileGenerator Custom Tool
option in Visual Studio extension settingsAre the latest Visual Studio updates installed?
N/A - issue building from command line only
.NET Framework:
Test Execution Method:
<SpecFlow> Section in app.config or content of specflow.json
Repro Project
https://github.com/fionnaos/specflow241-nunit
Issue Description
Trying to change from using Custom Tool for feature.cs file generation to using SpecFlow.Tools.MsBuild.Generation. It works fine from within Visual Studio, but when run from the command line, as done in our Jenkins server, the 'dotnet build' command returns:
Using MSBuild instead of dotnet gives an error about UpToDateCheckBuild in Specflow.Tools.MsBuild.Generation.props,
which seems to be about MSBuild not handling things from .NET Core. This also can be reproduced on a local machine, and with .NET Framework version 4.6.1, 4.7.1 and 4.7.2. Linked solution is as bare bones as possible to reproduce.
Steps to Reproduce