You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[x ] Classic project format using <PackageReference> tags
Sdk-style project format
(I think?)
.feature.cs files are generated using
SpecFlow.Tools.MsBuild.Generation NuGet package
SpecFlowSingleFileGenerator custom tool
Visual Studio Version
VS 2019
VS 2017
VS 2015
Enable SpecFlowSingleFileGenerator Custom Tool option in Visual Studio extension settings
Enabled
Disabled
Are the latest Visual Studio updates installed?
Yes
No, I use Visual Studio version <Major>.<Minor>.<Patch>
.NET Framework:
>= .NET 4.5
before .NET 4.5
.NET Core 2.0
.NET Core 2.1
.NET Core 2.2
.NET Core 3.0
.NET Core 3.1
Test Execution Method:
Visual Studio Test Explorer
TFS/VSTS/Azure DevOps – Task – PLEASE SPECIFY THE NAME OF THE TASK
[x ] Command line (dotnet test project_folder)
<SpecFlow> Section in app.config or content of specflow.json
Repro Project
Issue Description
I created a specflow test project as per the instructions. I also installed the Visual Studio Extension. THe feature file is there, the steps are generated, everything compiles according to Visual Studio, but when you go to run the test, the test has a blue exclamation mark next to it and says "1 Not Run" in OutComes, but with no explanation of why.
I tried to run the tests from the command prompt using dotnet test <project_name> and it returned the following errors:
C:\Users\sahab\source\repos\Address_and_Property_Lookup\packages\specflow.tools.msbuild.generation\3.1.97\build\SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018: The "GenerateFeatureFileCodeBehindTask" task failed unexpectedly. [C:\Users\sahab\source\repos\Address_and_Property_Lookup\FCT.PropertyLookupService.Spec\FCT.PropertyLookupService.Spec.csproj]
C:\Users\sahab\source\repos\Address_and_Property_Lookup\packages\specflow.tools.msbuild.generation\3.1.97\build\SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018: TechTalk.SpecFlow.SpecFlowException: Missing [assembly:GeneratorPlugin] attribute in C:\Users\sahab\source\repos\Address_and_Property_Lookup\packages\specrun.specflow.3-1-0\3.2.22\build\\netstandard2.0\SpecRun.Generator.SpecFlowPlugin.dll [C:\Users\sahab\source\repos\Address_and_Property_Lookup\FCT.PropertyLookupService.Spec\FCT.PropertyLookupService.Spec.csproj]
C:\Users\sahab\source\repos\Address_and_Property_Lookup\packages\specflow.tools.msbuild.generation\3.1.97\build\SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018: at TechTalk.SpecFlow.Generator.Plugins.GeneratorPluginLoader.LoadPlugin(PluginDescriptor pluginDescriptor) [C:\Users\sahab\source\repos\Address_and_Property_Lookup\FCT.PropertyLookupService.Spec\FCT.PropertyLookupService.Spec.csproj]
C:\Users\sahab\source\repos\Address_and_Property_Lookup\packages\specflow.tools.msbuild.generation\3.1.97\build\SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018: at TechTalk.SpecFlow.Generator.GeneratorContainerBuilder.LoadPlugins(ObjectContainer container, GeneratorPluginEvents generatorPluginEvents, UnitTestProviderConfiguration unitTestProviderConfiguration, IEnumerable`1 generatorPlugins) [C:\Users\sahab\source\repos\Address_and_Property_Lookup\FCT.PropertyLookupService.Spec\FCT.PropertyLookupService.Spec.csproj]
C:\Users\sahab\source\repos\Address_and_Property_Lookup\packages\specflow.tools.msbuild.generation\3.1.97\build\SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018: at TechTalk.SpecFlow.Generator.GeneratorContainerBuilder.CreateContainer(SpecFlowConfigurationHolder configurationHolder, ProjectSettings projectSettings, IEnumerable`1 generatorPluginInfos, IObjectContainer parentObjectContainer) [C:\Users\sahab\source\repos\Address_and_Property_Lookup\FCT.PropertyLookupService.Spec\FCT.PropertyLookupService.Spec.csproj]
C:\Users\sahab\source\repos\Address_and_Property_Lookup\packages\specflow.tools.msbuild.generation\3.1.97\build\SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018: at SpecFlow.Tools.MsBuild.Generation.WrappedGeneratorContainerBuilder.BuildGeneratorContainer(SpecFlowConfigurationHolder specFlowConfigurationHolder, ProjectSettings projectSettings, IReadOnlyCollection`1 generatorPluginInfos, IObjectContainer rootObjectContainer) [C:\Users\sahab\source\repos\Address_and_Property_Lookup\FCT.PropertyLookupService.Spec\FCT.PropertyLookupService.Spec.csproj]
C:\Users\sahab\source\repos\Address_and_Property_Lookup\packages\specflow.tools.msbuild.generation\3.1.97\build\SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018: at SpecFlow.Tools.MsBuild.Generation.GenerateFeatureFileCodeBehindTaskExecutor.Execute() [C:\Users\sahab\source\repos\Address_and_Property_Lookup\FCT.PropertyLookupService.Spec\FCT.PropertyLookupService.Spec.csproj]
C:\Users\sahab\source\repos\Address_and_Property_Lookup\packages\specflow.tools.msbuild.generation\3.1.97\build\SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018: at SpecFlow.Tools.MsBuild.Generation.GenerateFeatureFileCodeBehindTask.Execute() [C:\Users\sahab\source\repos\Address_and_Property_Lookup\FCT.PropertyLookupService.Spec\FCT.PropertyLookupService.Spec.csproj]
C:\Users\sahab\source\repos\Address_and_Property_Lookup\packages\specflow.tools.msbuild.generation\3.1.97\build\SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\Users\sahab\source\repos\Address_and_Property_Lookup\FCT.PropertyLookupService.Spec\FCT.PropertyLookupService.Spec.csproj]
C:\Users\sahab\source\repos\Address_and_Property_Lookup\packages\specflow.tools.msbuild.generation\3.1.97\build\SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [C:\Users\sahab\source\repos\Address_and_Property_Lookup\FCT.PropertyLookupService.Spec\FCT.PropertyLookupService.Spec.csproj]
So it looks like the root error is error MSB4018: TechTalk.SpecFlow.SpecFlowException: Missing [assembly:GeneratorPlugin] attribute in C:\Users\sahab\source\repos\Address_and_Property_Lookup\packages\specrun.specflow.3-1-0\3.2.22\build\\netstandard2.0\SpecRun.Generator.SpecFlowPlugin.dll but I have no idea why.
Thoughts on how to fix this? More than happy to provide any more information that you may need.
Thanks,
Sahab
The text was updated successfully, but these errors were encountered:
SpecFlow Version:
Used Test Runner
Version number: 3.2.22
Project Format of the SpecFlow project
packages.config
<PackageReference>
tags(I think?)
.feature.cs files are generated using
SpecFlow.Tools.MsBuild.Generation
NuGet packageSpecFlowSingleFileGenerator
custom toolVisual Studio Version
Enable SpecFlowSingleFileGenerator Custom Tool
option in Visual Studio extension settingsAre the latest Visual Studio updates installed?
<Major>.<Minor>.<Patch>
.NET Framework:
Test Execution Method:
<SpecFlow> Section in app.config or content of specflow.json
Repro Project
Issue Description
I created a specflow test project as per the instructions. I also installed the Visual Studio Extension. THe feature file is there, the steps are generated, everything compiles according to Visual Studio, but when you go to run the test, the test has a blue exclamation mark next to it and says "1 Not Run" in OutComes, but with no explanation of why.
I tried to run the tests from the command prompt using
dotnet test <project_name>
and it returned the following errors:So it looks like the root error is
error MSB4018: TechTalk.SpecFlow.SpecFlowException: Missing [assembly:GeneratorPlugin] attribute in C:\Users\sahab\source\repos\Address_and_Property_Lookup\packages\specrun.specflow.3-1-0\3.2.22\build\\netstandard2.0\SpecRun.Generator.SpecFlowPlugin.dll
but I have no idea why.Thoughts on how to fix this? More than happy to provide any more information that you may need.
Thanks,
Sahab
The text was updated successfully, but these errors were encountered: