【问题标题】:CruiseControl.NET showing type or namespace error when trying to build NUnit test projectCruiseControl.NET 在尝试构建 NUnit 测试项目时显示类型或命名空间错误
【发布时间】:2015-02-12 19:18:37
【问题描述】:

我正在尝试让 CC.net 构建和运行我的 NUnit 测试(CC.NET 在单独的机器上)。

但是,当它遇到 MyProject.Tests.csprog 时,它会退出,但有例外:

找不到类型或命名空间“NUnit”(您是否缺少 使用指令还是程序集引用?)

测试在我的本地机器上的 Visual Studio 中构建和运行得非常好。

如何解决此构建错误?

我在 CC.NET 机器上安装了 NUnit。我也阅读了一些 CC.net/NUnit 指令,但它们都提到包括MyProject.Tests.dll,但没有生成此 DLL(构建失败并出现上述错误)。

有什么想法吗?

【问题讨论】:

    标签: nunit cruisecontrol.net


    【解决方案1】:

    问题是我的<buildArgs> 元素中没有ReferencePath

    <buildArgs>/noconsolelogger 
        /v:quiet 
        ...snip...
        /p:ReferencePath="C:\Program Files (x86)\NUnit 2.6.4\bin\framework"
    </buildArgs>
    

    非常感谢 Matteo 的这篇博文https://ilmatte.wordpress.com/category/cruisecontrolnet/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-04-23
      相关资源
      最近更新 更多