How to configure MSBuild to do some tasks only on release builds?

Check the configuration condition.

<Target Name="AfterBuild" Condition="'$(Configuration)' == 'Release' ">

  <FxCop TargetAssemblies="@(OutputAssemblies)"
       RuleLibraries="@(FxCopRuleAssemblies)" 
       DependencyDirectories="$(MSBuildCommunityTasksPath)"
       FailOnError="False"
       ApplyOutXsl="True"
       OutputXslFileName="C:\Program Files\Microsoft FxCop 1.32\Xml\FxCopReport.xsl"
       DirectOutputToConsole="true"/>
</Target>

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)