Teamcity build shows warning CS0472 for WCF Service build, but not Visual Studio
When I build my wcf library project with Team City, I get the following warning:
"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 'de开发者_开发知识库cimal' is never equal to 'null' of type 'decimal?'
I am not sure how to resolve this because I don't even see line 762 in ColorService.cs.
When I build the project in Visual Studio, I don't see this warning.
Take the copy of ColorService.cs from your TeamCity code location and compare it (use a Diff tool) to your local copy from Visual Studio.
Make sure they're the same, as it sounds like TeamCity might be getting a bit mixed up and is possibly holding onto an old copy of the file.
精彩评论