The Command Exited With Code 5 - Build/Run Issues

Hey everyone!

Got a friend who is having a hard time getting a project I sent to him to build and run on his laptop.
Specifically, when he tries, he gets an error saying, roughly, that the command [string of command prompt commands] exited with code 5. It also mentions that he should verify having sufficient rights to run the command.

Furthermore, every bit of content not in a folder refuses to build, telling us that “TextureImporter had an unexpected failure” in the case of images, and “FontDescrptionProcesser had an unexpected failure” when it comes to fonts.
By in a folder, I mean that this project contains wave files in a Samples folder which cause no issues. Everything just in Content throws an error.

A list of errors can be found here.

We spent a few hours debugging a few nights ago, and got nowhere.
We’re both using Visual Studio Community 2017, Windows 10 64 bit OS.
As far as we could tell, he has all necessary C++ runtimes installed, as well as DirectX.
This is with Monogame 3.7.1.

The odd thing is, he can get it to work fine on his desktop, but not the laptop.
The files I sent him, if that matters, was everything in the project folder.

If y’all have any ideas, we’re all ears. =-)

PS: If any other information is needed, just let me know.

I wonder what would happen if you remove and re-add items to Content (?), clean, & rebuild all. Maybe something to do with paths?

Hey there!

We did do that, he removed it, then added them into the solution explorer directly, but no changes to the outcome, unfortunately.

Red flag already…

Another red flag totally relatable to the first…

Is he running something idiotic such as mycoffee [Not typing their name here lol] or something? could be his system [assuming he is the admin user] maybe have a corruption in the user rights access?

Is he trying to run it on an external drive?

I could go on, but the fact remains, this is evidently something to do with the laptop than anything else…

Out of curiosity, can he select x64 compile instead of x86? I mean, has he tried both?

Another thing that springs to mind… what is the file properties for the images? copy if newer or?

Also, can he compile a fresh template on that laptop?

After way too much stress on his part, there’s at least some progress.

The verification issue has been resolved after installing the C++ 2013 runtimes, but there’s a lingering issue with loading the font.
Specifically, “unable to load DLL freetype6.dll.”

We found out the verification issue was fixed after removing the font from the project.

EDIT: We’re trying to load files through the content pipeline popup, if that matters any, instead of dragging and dropping into the solution explorer. There may be more that I need to mention, but I’m far too tired to think much more on this.

Is this a regular windows template? I’ve looked inside csproj files of my own and never seen any reference to freetype6.dll but I did see it in someone else’s older build (which had some 2012 dependency).

I’d imagine you already tried changing deleting and re-creating the font as some basic default?

Mm, yeah, just the Monogame Windows project template.
We tried to change it to Arial, but even that gave the same error.

Hmm - maybe check out this:

That was the missing piece, thank you!

He was able to install that and everything ran flawlessly.
Thanks everyone! =-)

PS: For anyone else that comes across this, what was required to install is as follows.
Monogame (version 3.7.1 as of today)
C++ redistributable 2012 x64
C++ redistributable 2013 x64
Visual Studio 2017 Community Edition with C# and C++ options checked

1 Like