Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Random VSTS Build Errors - Process 'msbuild.exe' exited with code '-1'.

I have a medium sized ASP.NET MVC4 solution with about 15 projects in it. I have been using a paid Hosted Pipeline (VS 2017) in VSTS for my builds. Although I keep getting the error below, randomly in the build or package steps. Re-run the build and it will pass with no other changes made in source code! No other errors, details errors are shown in the build log. And it occurs randomly in any of the project in the solution. Any idea what could be causing it or how to get more info on the error to avoid it?

[error]Process 'msbuild.exe' exited with code '-1'.

like image 531
Sanddy Avatar asked Apr 27 '17 13:04

Sanddy


2 Answers

Microsoft is investigating this right now. It seems to be tied to another issue that crashes vstest as well.

A temporary suggested workaround (I haven't tried this myself) as reported in that thread:

For a temporary work around if you add a second vsbuild task right after the first one and set the first to continue on error it seems to complete successfully 100% of the time.

like image 113
nielsvk Avatar answered Oct 14 '22 01:10

nielsvk


We have finally identified the issue and are working on rolling out an updated image with a mitigation. It turns out that the automatic update feature for VSIX extensions runs as a scheduled task in Windows. When this process starts it will terminate all process for executables that exist under the Visual Studio install directory. We are rolling out an image that turns off this scheduled task. I appreciate the patience as we worked to resolve this issue.

like image 34
Chris Patterson Avatar answered Oct 14 '22 02:10

Chris Patterson