# Failing a TFSBuild when fbcmd stops with an error

**URL:** https://www.finalbuilder.com/forums/t/failing-a-tfsbuild-when-fbcmd-stops-with-an-error/1807
**Category:** Discussion
**Created:** [July 20, 2011, 6:42am UTC](https://www.finalbuilder.com/forums/t/failing-a-tfsbuild-when-fbcmd-stops-with-an-error/1807 "2011-07-20T06:42:05Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [July 20, 2011, 6:42am UTC](https://www.finalbuilder.com/forums/t/failing-a-tfsbuild-when-fbcmd-stops-with-an-error/1807/1 "2011-07-20T06:42:05Z")

</div>

I continue to get "partially succeeded" builds with TFS2010 when FBcmd stops the build with an error.

I need TFS to report the build as a failure, rather than a partial success. &nbsp; What settings do I need?

I using TFS2010, we are running FBCmd via the tfsbuild.proj. &nbsp; We do not want to move to the workflow style builds.

on FB 7.0.0.1065

&nbsp; &nbsp;

&nbsp;

&nbsp;

&nbsp; &nbsp; &nbsp; ProjectFile="$(SolutionRoot)\..\BuildType\xxxxxx\_Dev.fbp7"&nbsp;

&nbsp;

&nbsp;

&nbsp; &nbsp; &nbsp; AllowInteractive="False"&nbsp;

&nbsp;

&nbsp;

&nbsp; &nbsp; &nbsp; DontWriteToLog="False"&nbsp;

&nbsp;

&nbsp;

&nbsp; &nbsp; &nbsp; StopIfFBFails="True"&nbsp;

&nbsp;

&nbsp;

&nbsp; &nbsp; &nbsp; ShowBanner="False"&nbsp;

&nbsp;

&nbsp;

&nbsp; &nbsp; &nbsp; FBVersion="-1"&nbsp;

&nbsp;

&nbsp;

&nbsp; &nbsp; &nbsp; Variables="BuildNumber=$(BuildNumber);DropLocation=$(DropLocation);FlavorToBuild=%(ConfigurationToBuild.FlavorToBuild);PlatformToBuild=%(ConfigurationToBuild.PlatformToBuild)"

&nbsp;

&nbsp;

&nbsp; &nbsp; &nbsp; /\>

&nbsp;

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [July 21, 2011, 3:38am UTC](https://www.finalbuilder.com/forums/t/failing-a-tfsbuild-when-fbcmd-stops-with-an-error/1807/2 "2011-07-21T03:38:05Z")

</div>

Hi Alex,   
 Although it’s possible to get TFS2010 and FinalBuilder working without using windows workflow, it’s not a configuration we support. None of the extension points that we used with TFS2005/8 to create the .proj work with 2010, and as a result we don’t have really have any control over the interaction.   
  
 That said, this article might help: [http://blogs.msdn.com/b/aaronhallberg/archive/2007/11/05/how-to-fail-a-build-when-tests-fail.aspx](http://blogs.msdn.com/b/aaronhallberg/archive/2007/11/05/how-to-fail-a-build-when-tests-fail.aspx). Although focused on test results I suspect the solution (setting CompilationStatus) will work with FB.   
  
 Cheers,   
  
 Ben

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [July 22, 2011, 12:52pm UTC](https://www.finalbuilder.com/forums/t/failing-a-tfsbuild-when-fbcmd-stops-with-an-error/1807/3 "2011-07-22T12:52:41Z")

</div>

so how can I get a return value from FBcmd that FB stopped, due to failure?   
  
  
  
  
 or can I call back to msbuild from the FB failure section?

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [July 22, 2011, 1:17am UTC](https://www.finalbuilder.com/forums/t/failing-a-tfsbuild-when-fbcmd-stops-with-an-error/1807/4 "2011-07-22T01:17:09Z")

</div>

Hi Alex,   
 Can you send your full tfproj to support at [finalbuilder.com](http://finalbuilder.com)? I’ll have a dig around and see if I can work out the best way to get it working.   
  
 Cheers,   
  
 Ben
