SpecFlowOSS / SpecFlow.Actions

BSD 3-Clause "New" or "Revised" License
57 stars 53 forks source link

[Selenium] The "GenerateFeatureFileCodeBehindTask" task failed unexpectedly for dotnet build #72

Closed bboshoven closed 2 years ago

bboshoven commented 2 years ago

I ran into a problem where Visual Studio can build a project with SpecFlow.Actions.Selenium fine, but whenever you use dotnet build it fails. I've tried the same with the example project located here and it seems to fail as well:

https://github.com/SpecFlowOSS/SpecFlow-Examples/tree/master/Actions/SeleniumExample

PS C:\Users\user\Downloads\SpecFlow-Examples-master\Actions\SeleniumExample\SeleniumExample> dotnet build .\SeleniumExample.csproj

Microsoft (R) Build Engine version 17.1.0-preview-21610-01+96a618ca5 for .NET

Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...

  All projects are up-to-date for restore.

  You are using a preview version of .NET. See: https://aka.ms/dotnet-core-preview

  SpecFlowFeatureFiles: Features\Calculator.feature

C:\Users\user\.nuget\packages\specflow.tools.msbuild.generation\3.9.50\build\SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018: The "GenerateFeatureFileCodeBehindTask" task failed unexpectedly. [C:\Users\user\Downloads\SpecFlow-Examples-master\Actions\SeleniumExample\SeleniumExample\SeleniumExample.csproj]

C:\Users\user\.nuget\packages\specflow.tools.msbuild.generation\3.9.50\build\SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly 'SpecFlow.Actions.Configuration.SpecFlowPlugin, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified. [C:\Users\user\Downloads\SpecFlow-Examples-master\Actions\SeleniumExample\SeleniumExample\SeleniumExample.csproj]

C:\Users\user\.nuget\packages\specflow.tools.msbuild.generation\3.9.50\build\SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018: File name: 'SpecFlow.Actions.Configuration.SpecFlowPlugin, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null' [C:\Users\user\Downloads\SpecFlow-Examples-master\Actions\SeleniumExample\SeleniumExample\SeleniumExample.csproj]

C:\Users\user\.nuget\packages\specflow.tools.msbuild.generation\3.9.50\build\SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018:    at SpecFlow.Actions.Configuration.Generation.TargetsGeneratorPlugin.GeneratorPluginEvents_CustomizeDependencies(Object sender, CustomizeDependenciesEventArgs e) [C:\Users\user\Downloads\SpecFlow-Examples-master\Actions\SeleniumExample\SeleniumExample\SeleniumExample.csproj]

C:\Users\user\.nuget\packages\specflow.tools.msbuild.generation\3.9.50\build\SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018:    at TechTalk.SpecFlow.Generator.Plugins.GeneratorPluginEvents.RaiseCustomizeDependencies(ObjectContainer container, SpecFlowProjectConfiguration specFlowProjectConfiguration) [C:\Users\user\Downloads\SpecFlow-Examples-master\Actions\SeleniumExample\SeleniumExample\SeleniumExample.csproj]

C:\Users\user\.nuget\packages\specflow.tools.msbuild.generation\3.9.50\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\user\Downloads\SpecFlow-Examples-master\Actions\SeleniumExample\SeleniumExample\SeleniumExample.csproj]

C:\Users\user\.nuget\packages\specflow.tools.msbuild.generation\3.9.50\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\user\Downloads\SpecFlow-Examples-master\Actions\SeleniumExample\SeleniumExample\SeleniumExample.csproj]

C:\Users\user\.nuget\packages\specflow.tools.msbuild.generation\3.9.50\build\SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018:    at SpecFlow.Tools.MsBuild.Generation.GenerateFeatureFileCodeBehindTaskExecutor.Execute() [C:\Users\user\Downloads\SpecFlow-Examples-master\Actions\SeleniumExample\SeleniumExample\SeleniumExample.csproj]

C:\Users\user\.nuget\packages\specflow.tools.msbuild.generation\3.9.50\build\SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018:    at SpecFlow.Tools.MsBuild.Generation.GenerateFeatureFileCodeBehindTask.Execute() [C:\Users\user\Downloads\SpecFlow-Examples-master\Actions\SeleniumExample\SeleniumExample\SeleniumExample.csproj]

C:\Users\user\.nuget\packages\specflow.tools.msbuild.generation\3.9.50\build\SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [C:\Users\user\Downloads\SpecFlow-Examples-master\Actions\SeleniumExample\SeleniumExample\SeleniumExample.csproj]

C:\Users\user\.nuget\packages\specflow.tools.msbuild.generation\3.9.50\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\user\Downloads\SpecFlow-Examples-master\Actions\SeleniumExample\SeleniumExample\SeleniumExample.csproj]

Build FAILED.
SabotageAndi commented 2 years ago

There were problems with the NuGet packaging. They should be fixed in the latest versions.