New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't generate feature.cs for linked features #1295

Open
melodron opened this Issue Oct 5, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@melodron
Copy link

melodron commented Oct 5, 2018

SpecFlow Version:

  • 2.4
  • 2.3
  • 2.2
  • 2.1
  • 2.0
  • 1.9

Used Test Runner

  • SpecFlow+Runner
  • MSTest
  • NUnit
  • Xunit

Version number: NUnit 3.10

Visual Studio Version

  • VS 2017
  • VS 2015
  • VS 2013

Are the latest Visual Studio updates installed?

  • Yes
  • No

.NET Framework:

  • >= .NET 4
  • before .NET 4

Test Execution Method:

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

<SpecFlow> Section in app.config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow" />
  </configSections>
  <specFlow>
    <!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config -->
  <!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config --><unitTestProvider name="NUnit" /></specFlow>
</configuration>

Repro Project

https://github.com/melodron/specflow-issue
There are two projects in this repository. "NonWorkingProject" uses Specflow 2.4 (and doesn't work). "WorkingProject" uses 2.2.0.

Issue Description

Hi,
Since Specflow 2.3.0, I can't generate feature.cs files from linked features at compile time (features added in a classic way still work).

I added SpecFlow.Tools.MsBuild.Generation as recommended in https://specflow.org/documentation/Generate-Tests-from-MsBuild/, still does not work.

@szaliszali

This comment has been minimized.

Copy link
Contributor

szaliszali commented Oct 5, 2018

related PR: #1167

4afee2c

  <ItemGroup>
    <SpecFlowFeatureFiles Include="**\*.feature">
      <CodeBehindFile>%(RelativeDir)%(Filename).feature.cs</CodeBehindFile>
    </SpecFlowFeatureFiles>
    <SpecFlowFeatureFiles Include="**\*.feature.xlsx">
      <CodeBehindFile>%(RelativeDir)%(Filename).feature.cs</CodeBehindFile>
    </SpecFlowFeatureFiles>
  </ItemGroup>

scans the project directory, ignores project content

@SabotageAndi SabotageAndi added the msbuild label Oct 8, 2018

@szaliszali szaliszali referenced a pull request that will close this issue Oct 30, 2018

Open

WIP fix Can't generate feature.cs for linked features #1317

1 of 7 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment