Visual Studio 2010和TFS 2008:构建单元测试项目

Pet*_*ter 9 unit-testing tfs2008 .net-4.0 visual-studio-2010

我们目前正在将VS2010用于测试驱动器,到目前为止,我们对它如何不与我们现有的Team Foundation Server 2008合作感到有些困惑.我们仍然拥有.NET 3.5上的所有项目以及我们现在正在构建解决方案它包含一个单元测试项目(自动在.NET 4.0中构建),TFS不会构建它.

.NET 4.0框架安装在TFS 2008上.

我们收到的错误是:

[Any CPU/Release] c:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(0,0): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.

作为临时解决方法,我们现在被迫删除所有测试项目,以便构建我们的解决方案.

Dar*_*rov 3

您需要在构建机器上安装 VS2010。

  • 您还需要更新 TFS 2008 生成服务以使用 .NET 4 MSBuild。http://www.richard-banks.org/2009/11/how-to-build-vs2010-solutions-using.html (3认同)
  • 这不是有点可笑吗?我们的构建服务器并不是为了开发...他们不能将所有必需的 dll 包装在“服务器包”之类的东西中吗...不过它确实可以工作,而且我想他们可以收取额外的 VS2010 许可证。 (2认同)