Skip to content
This repository has been archived by the owner on Nov 7, 2019. It is now read-only.

does not work with SpecFlow 2.2.1 #63

Closed
MovGP0 opened this issue Nov 16, 2017 · 5 comments
Closed

does not work with SpecFlow 2.2.1 #63

MovGP0 opened this issue Nov 16, 2017 · 5 comments

Comments

@MovGP0
Copy link

MovGP0 commented Nov 16, 2017

When I execute dotnet SpecFlow.NetCore I get the following error message:

λ dotnet SpecFlow.NetCore
Error: Can't find SpecFlow: ...\.nuget\packages\SpecFlow\2.1.0\tools\specflow.exe
Try specifying the path with --specflow-path.

The correct path is ~\.nuget\packages\SpecFlow\2.2.1\tools\specflow.exe. Please update the version. thx!

@smudge202
Copy link
Contributor

You can specify the path yourself as an arg

https://github.com/stajs/SpecFlow.NetCore/blob/master/src/SpecFlow.NetCore/Args.cs#L10

@MovGP0
Copy link
Author

MovGP0 commented Nov 16, 2017

I did and it's working. using it in this way now:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netcoreapp2.0</TargetFramework>
    <IsPackable>false</IsPackable>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <LangVersion>latest</LangVersion>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
    <PackageReference Include="NUnit" Version="3.9.0" />
    <PackageReference Include="NUnit3TestAdapter" Version="3.9.0" />
    <PackageReference Include="SpecFlow.NUnit.Runners" Version="2.2.1" />
    <PackageReference Include="System.Configuration.ConfigurationManager" Version="4.5.0-preview1-25914-04" />
  </ItemGroup>
  <ItemGroup>
    <DotNetCliToolReference Include="SpecFlow.NetCore" Version="1.0.0" />
  </ItemGroup>
  <Target Name="PrecompileScript" BeforeTargets="BeforeBuild">
    <Exec Command="dotnet SpecFlow.NetCore --specflow-path SpecFlow\2.2.1\tools\specflow.exe" />
  </Target>
</Project>

I guess the documentation should be updated.

@smudge202
Copy link
Contributor

Agreed, we should update the readme

@stajs
Copy link
Owner

stajs commented Nov 16, 2017

Auto-detection of SpecFlow version from the .csproj was merged yesterday thanks to @oakio (not yet released to nuget.org).

I'll take a PR to improve the README, but at least the output already hints at the solution:

Try specifying the path with --specflow-path.

@stajs
Copy link
Owner

stajs commented Nov 17, 2017

@stajs stajs closed this as completed Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants