Visual studio 2015 Specflow生成错误-无法识别的属性';财产';
我正在使用Specflow,在对测试进行校正的中途,它停止了工作,出现了以下错误:我已经尝试回滚我的更改,但仍然得到了相同的结果 我还重新安装了specflow,完全删除了mt-nuget包并恢复了它们。没有变化 当尝试构建包含specflow的项目时,我在所有.feature文件上都出现以下错误:Visual studio 2015 Specflow生成错误-无法识别的属性';财产';,visual-studio-2015,msbuild,specflow,Visual Studio 2015,Msbuild,Specflow,我正在使用Specflow,在对测试进行校正的中途,它停止了工作,出现了以下错误:我已经尝试回滚我的更改,但仍然得到了相同的结果 我还重新安装了specflow,完全删除了mt-nuget包并恢复了它们。没有变化 当尝试构建包含specflow的项目时,我在所有.feature文件上都出现以下错误: #error Generation error: SpecFlow configuration error -> Unrecognized attribute 'property'. Note
#error Generation error: SpecFlow configuration error -> Unrecognized attribute 'property'. Note that attribute names are case-sensitive.
在我的功能文件上运行specflow自定义工具时,我也会遇到上述错误
NCRunch还抱怨specflows MSBuild XML文件出现以下错误消息:
..\packages\SpecFlow.2.1.0\tools\TechTalk.SpecFlow.targets (47, 5): SpecFlow configuration error
我发现问题与我的应用程序配置有关。出于某种原因,它改为:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section property="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow" />
</configSections>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity property="FakeItEasy" publicKeyToken="eff28e2146d5fd2c" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity property="Autofac" publicKeyToken="17863af14b0044da" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<specFlow>
<!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config -->
<unitTestProvider property="xUnit" />
</specFlow>
</configuration>
需要将两个属性属性更改为名称:
<configSections>
<section name="specFlow" type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow" />
</configSections>
<specFlow>
<!-- For additional details on SpecFlow configuration options see http://go.specflow.org/doc-config -->
<unitTestProvider name="xUnit" />
</specFlow>