Kinook Software Forums

Go Back   Kinook Software Forums > Visual Build Professional > [VBP] General Discussion

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-27-2012, 12:17 PM
modernrocketry modernrocketry is online now
Registered User
 
Join Date: 04-06-2006
Posts: 19
Rebuild step if it fails via VBScript

I randomly experience a Microsoft VS2010\Windows 7 bug that causes a build to fail with a mt.exe error. It has been acknowledged by MS, but I have not seen a fix yet.

In the meantime, I'd like to work around it.

Is it possible to force a step to rebuild if the error or exitcode equals a certain value?

Something like this?

Sub vbld_StepDone()
If CLng(Application.ExpandMacros("%RUNPROGRAM_EXITCOD E%")) = mt.exe's exist code Then
Step.?????????
End If
End Sub
Reply With Quote
  #2  
Old 09-27-2012, 09:43 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 5,706
There is a retry option (on the More tab), but it always retries if the step fails (any exit code). If you only want to retry on one particular exit code, you could:

1) Put the Make VS step in a loop
2) Mark the Make VS step to continue on failure, and in the vbld_StepDone event, if devenv/msbuild returned a non-zero exit code other than the problem mt.exe exit code, force the build to fail (overriding the continue on failure option)
3) After the Make VS step, add an Exit step to exit the loop if the exit code was not the problem exit code.

See the attached sample.
Attached Files
File Type: bld RetryCode.bld (2.0 KB, 317 views)
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 03:17 PM.


Copyright 1999-2019 Kinook Software, Inc.