Peter
Peter

Reputation: 781

Azure build pipeline: dotnet build fails with: FileNotFoundException: Could not load file or assembly 'TechTalk.SpecFlow, Version=3.1.0.0

The build pipeline, using the task dotnet build started to fail, as the Build Engine version changed from 16.4.0+ to 16.5.0+ recently.

The nuget package SpecFlow has a dependency to the library TechTalk.SpecFlow.

Exception looks like:

C:\Users\VssAdministrator\.nuget\packages\specflow.tools.msbuild.generation\3.1.89\build\SpecFlow.Tools.MsBuild.Generation.targets(93,5): Error MSB4018: The "GenerateFeatureFileCodeBehindTask" task failed unexpectedly.
    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.

Investigations I did (which didn't help):

Any ideas?

Upvotes: 4

Views: 1136

Answers (1)

Tereza Tomcova
Tereza Tomcova

Reputation: 5088

It's an issue with .NET SDK 3.1.200.

As a workaround, you can stay at .NET SDK 3.1.102 until it's fixed (in .NET SDK, SpecFlow, or both).

Additional info:

https://github.com/SpecFlowOSS/SpecFlow/issues/1912 https://github.com/dotnet/core/issues/4404#issuecomment-599768237

Upvotes: 5

Related Questions