2

I am using msdeploy -presync to backup the current deployment of a website in IIS before the -postsync deploys it, however I recently had a situation where the -presync failed (raised a warning due to a missing dll) and the -postsync continued and overwrote the code.

Both the presync and postsync run batch files.

Obviously this is bad as the backup failed so there is no backout route if the deployment has bugs or fails.

Is there anyway to stop the postsync if the presync raises warnings with msdeploy?

Perhaps the issue here is that the presync failure was raised as a warning not an error.

1 Answer 1

1

Supply successReturnCodes parameter set to 0 (success return code convention) to presync option such as:

-preSync:runCommand="your script",successReturnCodes=0

More info at: http://technet.microsoft.com/en-us/library/ee619740(v=ws.10).aspx

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.