Teamcity构建显示警告CS0472用于WCF服务构建,但不显示Visual Studio

时间:2011-06-10 16:07:12

标签: wcf teamcity compiler-warnings

当我使用Team City构建我的wcf库项目时,我收到以下警告:

"C:\TeamCity\buildAgent\temp\buildTmp\.NETFramework,Version=v4.0.AssemblyAttributes.cs" [10:48:33]: [Csc] Services\External\ColorService.cs(762, 74): warning CS0472: The result of the expression is always 'false' since a value of type 'decimal' is never equal to 'null' of type 'decimal?'

我不知道如何解决这个问题,因为我甚至没有在ColorService.cs中看到第762行。

当我在Visual Studio中构建项目时,我没有看到此警告。

1 个答案:

答案 0 :(得分:0)

从TeamCity代码位置获取ColorService.cs的副本,并将它(使用Diff工具)与Visual Studio中的本地副本进行比较。

确保它们是相同的,因为听起来TeamCity可能会有点混淆并且可能保留文件的旧副本。