Techtalk.Specflow Error: Failed to load assembly file or assembly

I have seen this question before, but I believe that it has not been resolved. Basically my settings are as follows: VS 2015 Specflow ver 1.9.0 (I downgraded this from 2.1.0 based on another question that didn't help)

When I try to build my project, it is accompanied by the following error:

  #error Generation error: Could not load file or assembly 'TechTalk.SpecFlow, Version = 1.9.0.77, Culture = neutral, PublicKeyToken = 0778194805d6db41' or one of its dependencies.  The system cannot find the file specified. 
+6
source share
2 answers

Check package.config and see if it has an entry for TechTalk.SpecFlow . If so, then remove the entry from the package configuration file ... and also remove the entire assembly associated with this DLL. Reinstall the specific version from NuGet and recompile your project.

In your comment, it still targets the new version newVersion="2.1.0.0" , not the new version Version=1.9.0.77 . Change your app.config as

 <assemblyIdentity name="TechTalk.SpecFlow" publicKeyToken="0778194805d6db41" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="1.9.0.77" /> 
+4
source

Just remove specflow from the menu VS - Tools >> Extension and Updates and reinstall. This will request a reboot of VS, and you're done.

0
source

All Articles