So we have test solutions that are stuck at 2.4.1 because of using SpecFlow.Unity and to re-engineer how that is working is a pretty much a lost cause at this point. This is using .NET Framework 4.8 and has a sdk style csproj file.
Even with SpecFlowSingleFileGenerator turned off in VS (2019), when you go to add a new feature file this gets created in the csproj file:
<ItemGroup> <SpecFlowFeatureFiles Remove="Features\Echo\TestFeatureFileTest.feature" /> </ItemGroup> <ItemGroup> <Compile Update="Features\Echo\TestFeatureFileTest.feature.cs"> <DesignTime>True</DesignTime> <AutoGen>True</AutoGen> <DependentUpon>TestFeatureFileTest.feature</DependentUpon> </Compile> </ItemGroup> <ItemGroup> <None Update="Features\Echo\TestFeatureFileTest.feature"> <Generator>SpecFlowSingleFileGenerator</Generator> <LastGenOutput>TestFeatureFileTest.feature.cs</LastGenOutput> </None> </ItemGroup>
So in order to get the feature file to build the feature.cs you have to delete out the SingleFileGenerator sections and then switch the top section to say Include instead of Remove. Then you have actually go delete the generated feature.cs file and rebuild.
Is this a bug or is there any better way to continue using this version of Specflow without having to touch the csproj file so much.
Things I have tried is creating a new project from scratch and downgrading project to 2.4.1 then adding everything back in, same result.
However I did disable the SpecFlow VS extension, and try out Deveroom and that worked fine.
Please sign in to leave a comment.