Content Builder not correctly handling white space path

Unsure how this community usually handles issues as I’m new here, but I encountered a problem setting up my environment. Upon launch my build fails with MSB3073, as the path to where the tool is located is incomplete.

I was greeted with

Could not execute because the specified command or file was not found.
Possible reasons for this include:

  • You misspelled a built-in dotnet command.
  • You intended to execute a .NET Core program, but dotnet-C:\Users\X does not exist.
  • You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.

where the user folder is actually “X Y”

Turns the command in RunContentBuilder is
" Command="$(DotnetCommand) $(MGCBPath) $(MonoGameMGCBAdditionalArguments) /@:"%(ContentReference.FullPath)" /platform:$(MonoGamePlatform) /outputDir:"%(ContentReference.ContentOutputDir)" /intermediateDir:"%(ContentReference.ContentIntermediateOutputDir)" /workingDir:"%(ContentReference.FullDir)"""

where placing " around the MGCBPath resolves my issue.

Hopefully this is helpful to anyone else encountering this issue.

The fix to this problem comes out in version 3.8.1 :smiley:

Is there an estimate on when version 3.8.1 will be available?

Are you using a local user account?

I’m having the problem with a local user account.

I see, I guessed so… seems to be a recurring issue across the board…

Hey there!

You can solve the issue by yourself if you change one of your files to the updated one:

Replace the original file (located at C:\Users"X Y".nuget\packages\monogame.content.builder.task\\build) with the linked one, and it should be fine!

1 Like

Thank you!

I was new to MonoGame and VS (coming from Python/Golang) and stumbled upon this issue. For any future coders looking at this topic: this solves the problem indeed.