Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/329.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何在specflow中正确引用外部定义类_C#_Visual Studio 2013_Mstest_Specflow - Fatal编程技术网

C# 如何在specflow中正确引用外部定义类

C# 如何在specflow中正确引用外部定义类,c#,visual-studio-2013,mstest,specflow,C#,Visual Studio 2013,Mstest,Specflow,我已经浏览了specflow文档以及一些在线帖子,其中一些帖子也是关于如何在specflow项目中使用外部类库的。我试着使用这些建议,但似乎没有一个解决方案适合我 我试图引用一个外部项目中的外部类,该项目将由我的specflow功能调用 我知道我的配置需要如下所示: <?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> <section name="sp

我已经浏览了specflow文档以及一些在线帖子,其中一些帖子也是关于如何在specflow项目中使用外部类库的。我试着使用这些建议,但似乎没有一个解决方案适合我

我试图引用一个外部项目中的外部类,该项目将由我的specflow功能调用

我知道我的配置需要如下所示:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <section name="specFlow"     type="TechTalk.SpecFlow.Configuration.ConfigurationSectionHandler, TechTalk.SpecFlow" />
  </configSections>
  <specFlow>
    <unitTestProvider name="MsTest" />
    <stepAssemblies>
      <stepAssembly assembly="UtilityClasses"/>
    </stepAssemblies>
  </specFlow>
</configuration>
这是我的功能文件:

Scenario: LPSS_AdminRegistration_PrivateLandlord
     Given I click Register
由于某种原因,它就是不能把它捡起来


任何帮助都将不胜感激,即使这对我来说是一个愚蠢的错误。我已经看了好几个小时了。

好的,看来我做的参考是正确的。基本上,如果我构建并运行它,测试就会通过

所以我所做的是重新启动VS2013 Ultimate,现在显示它很好

但是,如果我在等级库流特征文件中进行更改,它会再次将其标记为红色,就好像它试图调用的方法不存在一样。但是,如果我构建并运行测试,它也会工作。我假设这是specflow的一个bug

Scenario: LPSS_AdminRegistration_PrivateLandlord
     Given I click Register