2015-11-05 32 views
0

如何在使用NUnit时停止来自TFS CI构建的DiaSession警告?如何在使用NUnit时停止来自TFS CI构建的DiaSession警告?

0 error(s), 1 warning(s) 
Unable to create DiaSession for .... 
No source location data will be available for this assembly. 
+0

它是NUnit的[TestConverter](https://github.com/nunit/nunit3-vs-adapter/blob/master/src/NUnitTestAdapter/TestConverter.cs)类的一部分,并且它们评论说,他们有DiaSessions的问题,所以你得到警告。您可以扩展NUnit以删除警告或取消msbuild [nowarn](https://msdn.microsoft.com/zh-cn/library/13b90fz7.aspx)上的警告。 – Curios

+1

扩展TestConverter类以给出特定的错误号,并在该数字的msbuild中禁用也可能工作... – Curios

回答

0

您需要使用添加/ P:NoWarn = warningNumber在的MSBuild参数在构建定义。或者使用/ p:WarningLevel = 0参数来禁止所有警告。 enter image description here

相关问题