Error MSB4018 when referencing generator plug-in and building with dotnet build
My Visual Studio solution has two projects:
- project which implements a SpecFlow generator plug-in
- example project to use the SpecFlow generator plug-in (see below)
<ItemGroup> <SpecFlowGeneratorPlugins Include="..\Output\net471\Com.<...>.SFP.<...>.SpecFlow.3.9.SpecFlowPlugin.dll" /> </ItemGroup>
Both projects target net471 and netcoreapp2.1.
Building in Visual Studio 2022 succeeds, but when building from the command line with dotnet build results in the following error:
SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018: The "GenerateFeatureFileCodeBehindTask" task f ailed unexpectedly.
What could be the reason why buiding with dotnet fails?
Please sign in to leave a comment.