SpecFlow.Rider
SpecFlow.Rider copied to clipboard
Steps in Linked feature files are showing up as undefined and Plugin Intellisense not working
I am using my feature files as .csproj
linked files. I need to to it in this fashion because my feature files are in a separate repo and I include them in the main repo as git subrepo
. After that I just include the relevant .feature
file as a Linked file in my Test project. However when I do that, the SpecFlow Plugin intellisense like "Go To Reference / Find Usages" does not seem to work. Also the steps show up as undefined even though I have defined and implemented them. This problem does not cause a build or Test issue. I'm using the latest version of the Plugin, .net 5.0
and xUnit
testing framework
Is there a workaround for this that anybody can suggest?
Hello,
I did not have time to check yet. It would help if you can provide us with a small project to reproduce the bug.
Hi,
Thanks for responding. I have added a project in my github for your reference... https://github.com/rdasan/LinkedFeatureFile/tree/master/LinkedFeatureFile
The sample.feature
file is added as a Linked file in the LinkedFeatureFile project
@Socolin Was that helpful? The sample project illustrating the issue?
I'll check this tonight
Can you verify if this build fix your problem ? https://github.com/SpecFlowOSS/SpecFlow.Rider/runs/2072240670
@Socolin Apologies for not getting back on this. I did not get a chance to check that build. But I have the latest Release installed now and it's still not working for Linked Files.
@rdasan Is this working in Visual Studio for you? With SpecFlow 3.0 we dropped support for files that are at another location than under the project. The reason is, that there are some questions, we couldn't answer. Like where to generate the *.feature.cs file for linked files.
@SabotageAndi I have not tried on Visual Studio. Right now in Rider, when I Link the feature
file and set the Build Action as SpecFlowFeatureFiles
, the feature.cs
file gets generated at the same .../dotnet/test/Features
location. Which I'm fine with. But the Linked feature
has zero intellisense or any features offered by the SpecFlow Rider Plugin. It just behaves like a plain text file.
@rdasan Is this working in Visual Studio for you? With SpecFlow 3.0 we dropped support for files that are at another location than under the project. The reason is, that there are some questions, we couldn't answer. Like where to generate the *.feature.cs file for linked files.
Isn't it safe to generate the files to the same location as the original file?
@nferrellcmg No, it is not. When you link the file in multiple projects you run quickly into problems. At least with the namespace.