Version number:
packages.config<PackageReference> tagsSpecFlow.Tools.MsBuild.Generation NuGet packageSpecFlowSingleFileGenerator custom toolEnable SpecFlowSingleFileGenerator Custom Tool option in Visual Studio extension settings<Major>.<Minor>.<Patch>
https://github.com/ObjectivityLtd/Ocaramba/tree/3.2.8/Ocaramba.Tests.Features
Build of project with installed SpecFlow.Tools.MsBuild.Generation is failing on Linux . there is no such problem on Windows
https://ci.appveyor.com/project/ObjectivityAdminsTeam/ocaramba/builds/31229837/job/0o2m3sl863sb324q
logs:
dotnet build --configuration Release /verbosity:minimal "Ocaramba.sln"
Microsoft (R) Build Engine version 16.6.0-preview-20105-01+5d872c945 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Restore completed in 78.28 ms for /home/appveyor/projects/ocaramba/Ocaramba.Tests.PageObjects/Ocaramba.Tests.PageObjects.csproj.
Restore completed in 80.77 ms for /home/appveyor/projects/ocaramba/OcarambaLite/OcarambaLite.csproj.
Restore completed in 1.92 ms for /home/appveyor/projects/ocaramba/Ocaramba/Ocaramba.csproj.
Restore completed in 2.52 ms for /home/appveyor/projects/ocaramba/Ocaramba.UnitTests/Ocaramba.UnitTests.csproj.
Restore completed in 2.15 ms for /home/appveyor/projects/ocaramba/Ocaramba.Tests.Xunit/Ocaramba.Tests.Xunit.csproj.
Restore completed in 2.46 ms for /home/appveyor/projects/ocaramba/Ocaramba.Tests.NUnit/Ocaramba.Tests.NUnit.csproj.
Restore completed in 17.18 ms for /home/appveyor/projects/ocaramba/Ocaramba.Tests.MsTest/Ocaramba.Tests.MsTest.csproj.
Restore completed in 9.4 ms for /home/appveyor/projects/ocaramba/Ocaramba.Tests.Features/Ocaramba.Tests.Features.csproj.
Restore completed in 2 ms for /home/appveyor/projects/ocaramba/Ocaramba.Tests.CloudProviderCrossBrowser/Ocaramba.Tests.CloudProviderCrossBrowser.csproj.
Restore completed in 2.14 ms for /home/appveyor/projects/ocaramba/Ocaramba.Tests.Angular/Ocaramba.Tests.Angular.csproj.
You are using a preview version of .NET Core. See: https://aka.ms/dotnet-core-preview
You are using a preview version of .NET Core. See: https://aka.ms/dotnet-core-preview
SpecFlowFeatureFiles: TestFeatures/SmokeTests.feature
/home/appveyor/.nuget/packages/specflow.tools.msbuild.generation/3.1.86/build/SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018: The "GenerateFeatureFileCodeBehindTask" task failed unexpectedly. [/home/appveyor/projects/ocaramba/Ocaramba.Tests.Features/Ocaramba.Tests.Features.csproj]
/home/appveyor/.nuget/packages/specflow.tools.msbuild.generation/3.1.86/build/SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly 'TechTalk.SpecFlow, Version=3.1.0.0, Culture=neutral, PublicKeyToken=0778194805d6db41'. The system cannot find the file specified.
I noticed similar issues with the .NET Core 3.1 preview SDK. It is working with the release SDK.
I didn't have yet time to have a look at this issue.
If you pin your sdk via global.json to a non review version, do you still get the error?
This is happening on the .NET Core 3.1 release SDK that came out in the last 24 hours (SDK 3.1.200, MSBuild 16.5.0). Our hosted devops builds started failing randomly. Pinning the previous SDK version (SDK 3.1.102, MSBuild 16.4.0) allowed our builds to succeed again.
We have similar issues after upgrading build serveres to dotnet SDK 3.1.200. Specflow version 3.1.86.
we have similar issue with circleci
C:Userscircleci.nugetpackagesspecflow.tools.msbuild.generation3.1.86buildSpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018: The "GenerateFeatureFileCodeBehindTask" task failed unexpectedly. [C:Userscircleciprojectspecs
See https://github.com/SpecFlowOSS/SpecFlow/issues/1912
There is a workaround available.
The workaround aren't working here.
C:\Users\Gabriel\.nuget\packages\specflow.tools.msbuild.generation\3.1.97\build\SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018: Falha inesperada da tarefa "GenerateFeatureFileCodeBehindTask". [C:\Users\Gabriel\source\repos\projeto_insumos_backend\Insumos.Assignment.Test\Insumos.Assignment.Test.csproj]
C:\Users\Gabriel\.nuget\packages\specflow.tools.msbuild.generation\3.1.97\build\SpecFlow.Tools.MsBuild.Generation.targets(93,5): error MSB4018: System.IO.FileNotFoundException: Could not load file or assembly 'TechTalk.SpecFlow, Version=3.1.0.0, Culture=neutral, PublicKeyToken=0778194805d6db41'. O sistema não pode encontrar o arquivo especificado. [C:\Users\Gabriel\source\repos\projeto_insumos_backend\Insumos.Assignment.Test\Insumos.Assignment.Test.csproj]
@GabrielHSFerreira please try the SpecFlow 3.3 beta. This version has fixes for this issue.
@GabrielHSFerreira please try the SpecFlow 3.3 beta. This version has fixes for this issue.
It worked for me. Thank you so much!
@GabrielHSFerreira please try the SpecFlow 3.3 beta. This version has fixes for this issue.
I can not see specFlow 3.3 version in my visaul studio 2019. I can see latest version is 3.1.97
@Mahesh-Coder-K 3.3 is currently only available as a pre-release package. You have to check the box for that to get it.
@SabotageAndi are you going yo update specrun.specflow to support Specflow 3.3 ?
@conmatf-cg Yes, we are currently working on the SpecFlow 3.3 support for SpecFlow+ Runner.
SDK 3.1.102,
This is happening on the .NET Core 3.1 release SDK that came out in the last 24 hours (SDK 3.1.200, MSBuild 16.5.0). Our hosted devops builds started failing randomly. Pinning the previous SDK version (SDK 3.1.102, MSBuild 16.4.0) allowed our builds to succeed again.
I solved issue on my project by commentin out
<!-- <PackageReference Include="SpecFlow.MsTest" Version="3.3.57" /> -->
This issue is solved with SpecFlow 3.3. SpecFlow+ Runner 3.3 is also out.
This issue is solved with SpecFlow 3.3. SpecFlow+ Runner 3.3 is also out.
Can you uncomment on my project and recheck?
@hack2root I checked your project.
You have also SpecFlow.NUnit in your project. You can't add both packages to the same project. These packages configure the used unit test provider in SpecFlow.
@hack2root I checked your project.
You have alsoSpecFlow.NUnitin your project. You can't add both packages to the same project. These packages configure the used unit test provider in SpecFlow.
I think i fixed it by commentig out SpecFlow.NUnit, all worked as a charm! Thanks for the SpecFlow great support!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
This is happening on the .NET Core 3.1 release SDK that came out in the last 24 hours (SDK 3.1.200, MSBuild 16.5.0). Our hosted devops builds started failing randomly. Pinning the previous SDK version (SDK 3.1.102, MSBuild 16.4.0) allowed our builds to succeed again.