【发布时间】:2011-01-30 16:18:50
【问题描述】:
我在努力让我们的构建服务器运行起来。我目前正在 Windows XP 虚拟机中运行测试,并安装了 TeamCity v5.0.3,构建 10821。我正在使用 NUnit v2.5.3。
我使用 TeamCity 完成了初始设置,完全没有任何问题,前提是我使用了 sln2008 构建运行器,这使得整个过程几乎无脑。这种方式真的很不错,看到你的第一个成功的自动化构建非常令人满意。
现在是时候把它提升一个档次了,我想让 NUnit 正常工作。我将 NUnit 2.5.3 程序集保存在 SVN 的外部库文件夹中,因此我将其签出到测试系统上。正如在线说明所推荐的那样,我从构建运行器选项中选择了 NUnit 2.5.3。但是当我构建时,我收到以下错误:
Window1.xaml.cs(14,7): error CS0246: The type or namespace name ‘NUnit’ could not be found (are you missing a using directive or an assembly reference?)
Window1.xaml.cs(28,10): error CS0246: The type or namespace name ‘Test’ could not be found (are you missing a using directive or an assembly reference?)
Window1.xaml.cs(28,10): error CS0246: The type or namespace name ‘TestAttribute’ could not be found (are you missing a using directive or an assembly reference?)
一切都在 IDE 中编译得很好。
通过查找博文和提交 cmets,我得到了一些建议并确认了以下几点:
- 我在项目文件中正确设置了 HintPath 值(指向外部库)
- 我还可以使用 msbuild 从命令行进行完整的发布和调试构建
- 我尝试过使用 NUnit 安装程序,以便将 nunit.framework.dll 注册到 GAC 中
- 我已将构建代理的登录帐户更改为测试系统上的用户,而不是本地系统上的用户。
似乎没有任何帮助......这里的其他人可以给我一些关于下一步尝试的建议吗?
【问题讨论】:
-
还有其他人遇到这种情况吗?我现在可能应该放弃它并返回为 CC.NET 构建 XML 文件。
标签: visual-studio-2008 unit-testing nunit continuous-integration teamcity