Skip to content
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

.feature.cs files are not re-generated automatically. Have to re-build the project #21

Closed
z41 opened this issue Apr 2, 2019 · 4 comments

Comments

@z41
Copy link

z41 commented Apr 2, 2019

I have to re-build the project in order to get .feature.cs files updated.
My guess that it might be related to async steps in my project (I see "Unable to jump to the step definition. No source location detected" for async steps).

Please, let me know if you need more details.
VS 2017 v15.9.10, .netcore 2.2 (or 2.3 - not sure).
Extension version is 1.1.1.

@z41 z41 closed this as completed Apr 2, 2019
@z41 z41 changed the title Async steps always pass .feature.cs files are no re-generated automatically. Have to re-build the project Apr 2, 2019
@z41 z41 changed the title .feature.cs files are no re-generated automatically. Have to re-build the project .feature.cs files are not re-generated automatically. Have to re-build the project Apr 2, 2019
@z41 z41 reopened this Apr 2, 2019
@z41
Copy link
Author

z41 commented Apr 2, 2019

Also the feature.cs file is not generated when I add a new feature file. No async methods in steps files.
I might be missing something from the Documentation, but it's all very suspicious and vague to me.
specflow

@z41
Copy link
Author

z41 commented Apr 2, 2019

Let me know if you want me to upload the demo project. But it's just a default netcore 2.2 xUnit project with specflow libs.

<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
    <PackageReference Include="specflow" Version="3.0.188" />
    <PackageReference Include="specflow.tools.msbuild.generation" Version="3.0.188" />
    <PackageReference Include="specflow.xunit" Version="3.0.188" />
    <PackageReference Include="xunit" Version="2.4.1" />
    <PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />

@gasparnagy
Copy link
Contributor

In SpecFlow v3, the generation of the code behind files has been entirely moved to build time using the SpecFlow.Tools.MsBuild.Generation NuGet package, so the fact that the code behind files are only visible after build that's absolutely normal.

The "Unable to jump to the step definition. No source location detected" error message might be an issue, I check it and get back to you.

@gasparnagy
Copy link
Contributor

Ok. The jumping to async step def is a bug. I have created a separate issue #23 for tracking it.

I close this one as the build-time generation is the by-design behavior in SpecFlow v3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants