开箱即用,SpecFlow 给我一个生成错误
Out of the box, SpecFlow is giving me a generation error
Google 对我来说并不多。这是 feature.cs 文件中的错误:
#error Generation error: Object reference not set to an instance of an object.
设置如下:
VS2017、XUnit、Specflow.XUnit、xunit.runner.visualstudio(以及所有依赖包)、mvc 站点。所有包等已更新。
添加功能文件(名为 SpecFlowFeature1.feature)。
右键单击特征文件并单击“生成步骤定义”。
SpecFlowFeature1.feature.cs 有错误。
为什么会这样,我需要做什么来修复它?
问题已解决。
SpecFlow 已添加到 Web 项目中,而不是在单独的单元测试项目中。
Google 对我来说并不多。这是 feature.cs 文件中的错误:
#error Generation error: Object reference not set to an instance of an object.
设置如下:
VS2017、XUnit、Specflow.XUnit、xunit.runner.visualstudio(以及所有依赖包)、mvc 站点。所有包等已更新。
添加功能文件(名为 SpecFlowFeature1.feature)。
右键单击特征文件并单击“生成步骤定义”。
SpecFlowFeature1.feature.cs 有错误。
为什么会这样,我需要做什么来修复它?
问题已解决。
SpecFlow 已添加到 Web 项目中,而不是在单独的单元测试项目中。