【发布时间】:2010-10-02 21:22:50
【问题描述】:
我正在用 msbuild 用这行代码编译一个 .net 3.5 解决方案:
msbuild.exe n:\temp\Thisnight.sln /p:Configuration=Debug /v:diag
它给了我这个错误:
error CS0234: The type or namespace name 'UnitTesting' does not exist in the namespace 'Microsoft.VisualStudio.TestTools' (are you missing an assembly reference?)
我已经获得了(当然)在 VS2010 本身中构建的最新源代码。
似乎无法弄清楚我在这里缺少什么......
编辑
在命令窗口的上方看到此消息:
C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets : warning MSB3245: Could not resolve this reference.
Could not locate the assembly "Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutra
l, 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.
我不认为我必须在我的项目中包含这个 DLL(因为它是一个 MS dll?)
编辑 我现在所看到的:所有项目都是针对 .Net 3.5 框架的,但 testproject(这是给我带来问题的项目)是针对 .Net 4.0 框架的。 奇怪的是:我无法改变它。
这是一个带有 web 的 vs2010 解决方案。 webservice、winforms、dll、设置和测试项目
【问题讨论】:
-
您能详细说明您的解决方案的内容吗?用当前的信息尝试和重现这个有点困难。
-
这是一个带有 16 个项目(web、webservice、winforms 和 dll)的 vs2010 解决方案。
标签: msbuild