我的VS2010解决方案中有一个测试项目.单元测试自己引用以下命名空间:
using Microsoft.VisualStudio.TestTools.UnitTesting;
Run Code Online (Sandbox Code Playgroud)
通过我的PC上的以下程序集访问:
Assembly Microsoft.VisualStudio.QualityTools.UnitTestFramework
C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\
PublicAssemblies\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll
Run Code Online (Sandbox Code Playgroud)
当我在我的PC上构建解决方案时,我没有任何问题; 测试将构建并运行正常.
我们有一个内部网页面,我们可以用它来启动构建服务器上的构建.当我通过此页面构建时,构建失败并出现以下错误:
Generator.cs(3,17): error CS0234: The type or namespace name 'VisualStudio'
does not exist in the namespace 'Microsoft' (are you missing an assembly
reference?)
Run Code Online (Sandbox Code Playgroud)
显而易见的问题是Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll上面提到的构建服务器上没有.我认为这将与VS2010一起安装,并且由于我的解决方案中的项目构建了.NET 4.0目标,我希望这将安装在构建服务器上.
解决这个问题的最简单方法是什么?构建服务器不在我的管辖范围内,我不特别想记录一个作业来安装新的库.