I'm trying to get msbuild to output code analysis info like it does in VS. I have a configuration for my project called "CodeAnalysis" in VS that is set up to run code analysis on build (with the minimum ruleset). Anyway this is working fine in VS, but when I run msbuild from the command line it only shows the basic build warnings and it doesn't run code analysis at all. Anyone know why this is happening?
Configuration in project file:
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'CodeAnalysis|AnyCPU'">
<OutputPath>bin\</OutputPath>
<CodeAnalysisRuleSet>C:\Program Files\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\Rule Sets\MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<RunCodeAnalysis>true</RunCodeAnalysis>
Command line:
msbuild Solution.sln /p:Configuration=CodeAnalysis /t:Rebuild
I also tried:
msbuild Solution.sln /p:RunCodeAnalysis=true /t:Rebuild