What does Exit Code 2 (Monogame Pipeline Tool) mean?

I occasionally get the error “Command … exited with code: 2” when building a game. What does exit code 2 mean?

If I build the content using the Pipeline Tool, everything builds just fine.
I’m using the Pipeline Tool from the 3.6 installer on Mac OS X.

The exit code for MGCB.exe - the CLI to the MonoGame content pipeline - is the number of items that it failed to build. You can see that in the source file https://github.com/MonoGame/MonoGame/blob/develop/Tools/MGCB/Program.cs

Are you 100% sure you’re building the same .mgcb with the Pipeline Tool? It uses MGCB.exe, so it shouldn’t be the case that one method fails while the other does not.

Edit: note that the automatic content building uses MGCB directly and does not use the pipeline tool