2015-11-05 33 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

相關問題