Make sure your <Target Name=”BeforeBuild”> and <Target Name=”AfterBuild”> is not commented. Build your project if FxCop catches any error you will see an error as “One or more FxCop warnings occurred. Please look at the Warnings tab.”