Specflow 代码隐藏文件未正确生成
Specflow Code behind file is not generated properly
我是 Specflow 和 C# 的新手。目前,我在将 .net core 更新为 2 并将 .net framework 版本更新为 4.6.2 后遇到一个问题。
Specflow - cs 文件背后的代码未正确生成。相反,我在文件后面的 specflow 功能代码中收到以下错误。
error Generation error: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401).
我该如何解决这个问题?
仅供参考:SpecFlow 尚不支持 .NET Core。
要解决您的问题,您需要版本 2017.1.14 中的 VS 集成(应自动更新 - link:https://github.com/techtalk/SpecFlow.VisualStudio/releases/tag/v2017.1.14)并使用 SpecFlow >= 2.3.0.
执行以下步骤后,旧版本的 specflow 已解决上述问题。
- 删除代码隐藏文件
- 关闭Visual Studio
- 再次打开visual Studio
- 重新生成特征文件。
我是 Specflow 和 C# 的新手。目前,我在将 .net core 更新为 2 并将 .net framework 版本更新为 4.6.2 后遇到一个问题。
Specflow - cs 文件背后的代码未正确生成。相反,我在文件后面的 specflow 功能代码中收到以下错误。
error Generation error: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401).
我该如何解决这个问题?
仅供参考:SpecFlow 尚不支持 .NET Core。
要解决您的问题,您需要版本 2017.1.14 中的 VS 集成(应自动更新 - link:https://github.com/techtalk/SpecFlow.VisualStudio/releases/tag/v2017.1.14)并使用 SpecFlow >= 2.3.0.
执行以下步骤后,旧版本的 specflow 已解决上述问题。
- 删除代码隐藏文件
- 关闭Visual Studio
- 再次打开visual Studio
- 重新生成特征文件。