自动测试项目上的MSBuild失败

自动测试项目上的MSBuild失败,msbuild,vs-unit-testing-framework,Msbuild,Vs Unit Testing Framework,我刚刚在我的C#解决方案中添加了一个自动测试项目,并将其签入构建服务器 当生成脚本使用MSBuild(.NET Framework 3.5)运行时,它会给出几个错误(例如以下错误): 当我在计算机上运行.NET 3.5 msbuild时,它会正确生成 生成服务器上没有.NET 4.0,因此无法升级。有谁能建议是什么导致了这种差异?我能做些什么来成功地构建测试项目 如上所述,最简单的方法是在构建服务器上安装适当版本的Visual Studio,以获取所有MSTest依赖项。这是典型的做法 如果出于

我刚刚在我的C#解决方案中添加了一个自动测试项目,并将其签入构建服务器

当生成脚本使用MSBuild(.NET Framework 3.5)运行时,它会给出几个错误(例如以下错误):

当我在计算机上运行.NET 3.5 msbuild时,它会正确生成

生成服务器上没有.NET 4.0,因此无法升级。有谁能建议是什么导致了这种差异?我能做些什么来成功地构建测试项目


如上所述,最简单的方法是在构建服务器上安装适当版本的Visual Studio,以获取所有MSTest依赖项。这是典型的做法

如果出于任何原因无法执行此操作,则以下页面将显示如何在不安装VS2008的情况下使依赖项可用:


您在生成服务器上安装了Visual Studio吗?没有,我的生成服务器上没有Visual Studio。我认为mstest(我还没有开始执行)是.NET框架的一部分。是否有任何方法可以在没有Visual Studio的情况下构建和运行自动化测试,或者我需要在单独的解决方案中进行测试,并且只在我的本地设备上运行测试?我相信您必须在测试服务器上安装测试部分;虽然将测试框架更改为Nunit。实际上,我已经将我的测试框架更改为Nunit,但是谢谢。这个链接似乎转到了HP??有趣的。。。shunra.com似乎转向了惠普。
**cs(2,17): error CS0234: The type or namespace name 'VisualStudio' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)

**.cs(21,17): error CS0246: The type or namespace name 'TestContext' could not be found (are you missing a using directive or an assembly reference?)

**.cs(73,10): error CS0246: The type or namespace name 'TestMethod' could not be found (are you missing a using directive or an assembly reference?)

**.cs(73,10): error CS0246: The type or namespace name 'TestMethodAttribute' could not be found (are you missing a using directive or an assembly reference?)

**.cs(14,6): error CS0246: The type or namespace name 'TestClass' could not be found (are you missing a using directive or an assembly reference?)

**.cs(14,6): error CS0246: The type or namespace name 'TestClassAttribute' could not be found (are you missing a using directive or an assembly reference?)