The error was various permutations of the FxCop error:
InfoMessageExtensions.cs(19):
error : CA1006 :
Consider a design where
'InfoMessageExtensions.InfoMessageFor<TModel, TProperty>(this
HtmlHelper<TMon<Func<TModel, TProperty>>, object)' doesn't nest generic type 'Expression<Func<TModel, TProperty>>'.
1.
MSBuild
(v4) was picking up old versions of FxCop
2.
The
Code Analysis suppression was not being taken into account
Issue 2 was
the killer. This is a BUG in Visual Studio. For the code analysis and
suppressions to work with MSBuild, the Conditional Compilation symbol CODE_ANALYSIS
must be added to the project file (VS.NET doesn’t need it but MSBUILD does).
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmVDdxAfU4zsFPiffncmEL5ZZGia94SbuhjCbQIP1D3L-UVmKo2_iBnUl3-D2CvaZbHhx0s3oIOd4knyo5O7mOo2s7rDBdjeM3TTJCFA-xP2r1EQ3WuNH_cm3Rv0KveOvS0kyGeXYyInU/s1600/1.jpg)
However the
bug is this: If ONE symbol is present, the symbol is not written to the Csproj.
After adding a dummy symbol it then appeared. See below for the before and after.
Then MSBuild works.
No comments:
Post a Comment