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).
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