SpecFlow Visual Studio扩展尝试使用SpecFlow代码隐藏生成器1.9 [英] SpecFlow Visual Studio extension attempted to use SpecFlow code-behind generator 1.9

查看:173
本文介绍了SpecFlow Visual Studio扩展尝试使用SpecFlow代码隐藏生成器1.9的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试构建自动化解决方案时出现以下错误.由于这个原因,目前我无法更改功能文件中的任何内容.

I am getting the following error while trying to build my automation solution. Due to which i am unable to change anything in my feature file at the moment.

错误版本冲突-SpecFlow Visual Studio扩展尝试使用SpecFlow生成器1.9背后的代码,但项目'POC.Specs'引用了SpecFlow 2.0.

error Version conflict - SpecFlow Visual Studio extension attempted to use SpecFlow code-behind generator 1.9, but project 'POC.Specs' references SpecFlow 2.0.

错误我们建议迁移到MSBuild代码隐藏的代以解决此问题.

error We recommend migrating to MSBuild code-behind generation to resolve this issue.

错误有关更多信息,请参见 https://specflow.org/documentation/Generate -Tests-from-MsBuild/

error For more information see https://specflow.org/documentation/Generate-Tests-from-MsBuild/

.net版本4.6.2 Specflow 2.0.0 TestStack白色 Visual Studio 2015

.net version 4.6.2 Specflow 2.0.0 TestStack White Visual Studio 2015

我尝试重新安装specflow 2.0.0,但仍然存在相同的问题

I have tried reinstalling specflow 2.0.0 but still the same issue persists

任何帮助将不胜感激.

推荐答案

以下步骤为我解决了该问题:-

The following steps resolved the issue for me:-

  1. 将具有与SpecFlow相同版本的NuGet包SpecFlow.Tools.MsBuild.Generation添加到您的项目中.
  2. 从功能文件中删除所有SpecFlowSingleFileGenerator自定义工具条目.(转到文件属性并删除自定义工具的值)
  3. 选择工具|选项|从Visual Studio的菜单中选择SpecFlow,并将Enable SpecFlowSingleFileGenerator CustomTool设置为"false".

首先尝试执行步骤3来解决此问题.如果这样做不能解决问题,请从步骤1开始.

引用链接

这篇关于SpecFlow Visual Studio扩展尝试使用SpecFlow代码隐藏生成器1.9的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆