Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specflow Code behind file is not generated properly

Tags:

c#

specflow

I am new to Specflow and C#. Currently, I am facing one issue after updating the .net core as 2 and .net framework version as 4.6.2.

Specflow - Code behind cs file is not getting generated properly. Instead I am getting the below error in the specflow feature-code behind file.

error Generation error: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401).

How can I sort out this issue?

like image 260
Subburaj Avatar asked May 29 '26 19:05

Subburaj


2 Answers

FYI: SpecFlow doesn't support .NET Core yet.

To fix your issue, you need the VS Integration in version 2017.1.14 (should be updated automatically - link: https://github.com/techtalk/SpecFlow.VisualStudio/releases/tag/v2017.1.14) and use SpecFlow >= 2.3.0.

like image 162
Andreas Willich Avatar answered May 31 '26 07:05

Andreas Willich


The above issue is solved with the specflow older version after doing the below steps.

  • Delete the Code Behind file
  • Close the Visual Studio
  • Open the visual Studio again
  • Regenerate the feature file again.
like image 27
Subburaj Avatar answered May 31 '26 08:05

Subburaj