如何在路径中使用空格运行PartCover?

时间:2010-06-10 18:32:13

标签: .net hudson partcover

我有一个msbuild文件,我正在尝试从Hudson CI运行。它像这样输出

  

“C:\ Program Files \ Gubka Bob \ PartCover   .NET 2 \ PartCover.exe“ - target   “C:\ Program Files \ Microsoft Visual   Studio 9.0 \ Common7 \ IDE \ MSTest.exe“   --target-args“/ noisolation”“/ testcontainer:C:\ CI \ Hudson \ jobs \ Video   抽奖\工作区\来源\ VideoRaffleCaller \来源\ VideoRaffleCaller.Test.Unit \ BIN \调试\ VideoRaffleCaller.Test.Unit.dll”   --include“[VideoRaffleCaller *] *” - output“Coverage \ partcover.xml”

我收到此错误

  

开关无效   “抽奖\工作空间\源\ videorafflecaller \源\ videorafflecall   er.test.unit \ BIN \调试\ videorafflecaller.test.unit.dll”。   对于切换语法,请键入“MSTest / help”

WTF?看起来PartCover不能很好地处理--target-args中的空格。或者我在某处遗漏了一些引用?有没有人喜欢上班?

1 个答案:

答案 0 :(得分:1)

你完全没错,你忘了引用这条路。阅读guide on how to integrate PartCover with MSBuild

--target-args=
Argument specifies arguments for target process. If target argument 
contains spaces - quote . If you want specify quote (") in , then 
precede it by slash (\)

因此,请尝试将testcontainer参数更改为

“/ testcontainer:\”C:\ CI \ Hudson \ jobs \ Video Raffle \ workspace \ Source \ VideoRaffleCaller \ Source \ VideoRaffleCaller.Test.Unit \ bin \ Debug \ VideoRaffleCaller.Test.Unit.dll \“”< / p>

相关问题