Specflow Code behind file is not generated properly

3

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?

c#
specflow
asked on Stack Overflow May 10, 2018 by Subburaj • edited Aug 6, 2018 by halfer

2 Answers

4

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.

answered on Stack Overflow May 10, 2018 by Andreas Willich
4

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.
answered on Stack Overflow May 17, 2018 by Subburaj • edited Jul 16, 2018 by Subburaj

User contributions licensed under CC BY-SA 3.0