How to set MSBuild to compile multiple times?

0

In our current product, we have multiple solution files of visual studio and multiple projects in them.

In those, few of the solutions .sln files may fail some times and if we retry , they will be successful.

So, we are using devenv.com till date and retrying for 5 times, if it fails on 5th time, we are failing the build job.

But how to integrate this in MSBuild script. Like, we can use msbuild to build the project but how to set the retry attempts to till 5 and do the build process.

user2331760

Posted 2019-07-09T08:06:48.857

Reputation: 1

This looks like an XY problem. You should be trying to find out and fix the reason why the builds fail.

– DavidPostill – 2019-07-09T12:37:18.213

There are some dependency issues and to fix that, I need to change the architecture.

So that's why I'm asking this.

At present, is there any option in MSBuild, to keep retry option like for 5 times.? Or can we create any custom task for this in .msbuild file. – user2331760 – 2019-07-12T12:50:33.307

No answers