Upgrading to SpecFlow 3
Ensure that you have the following NuGet packages installed (at the latest version):
SpecFlowSingleFileGeneratorcustom tool entries from your feature file
Tools > Options > SpecFlowfrom the ribbon menu at the top of Visual Studio and set
Enable SpecFlowSingleFileGenerator CustomTooloption to
Switch to the
Open the project file
Add the following to the end of the file, just before the closing
<Target Name="AfterUpdateFeatureFilesInProject"> <!-- include any generated SpecFlow files in the compilation of the project if not included yet --> <ItemGroup> <Compile Include="**\*.feature.cs" Exclude="@(Compile)" /> </ItemGroup> </Target>
Switch back to
Right-click on the project and choose
Build > Rebuild Solutionfrom the ribbon menu at the top of Visual Studio.
Test Explorerand your Features should be present.