By default, code analysis is only done for projects which are compiled. So when I run MSBuild from the command line, it runs code analysis only for the first time. On subsequent
I would try using FxCopCmd.exe, it can be usually found in C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\FxCop. It's used by CodeAnalysis in Visual Studio, you should be able to use it with proper parameters.