Building Content (Content Pipeline)
The command "dotnet /quiet /@: ..." exited with code 1
Symptom
Building content in Visual Studio causes an error, and the error includes the string /@:
prior to the .mgcb path.
Solution - Modify the MonoGame.Content.Builder.Task.targets File
Open the MonoGame.Content.Builder.Task.targets file on your machine:
On PC:
C:\Users\{username}
\.nuget\packages\monogame.content.builder.task\{content builder version}\build
On Mac:
/Users/{username}/.nuget/packages/monogame.content.builder.task/{builder version}/build
Locate the line which begins with Command="$(DotnetCommand) $(MGCBPath) $(MonoGameMGCBAdditionalArguments)
. This should be around line 140 by default.
Insert the text "
before and after the text $(MGCBPath)
Save the .targets file and build your project again.
Additional information: https://community.monogame.net/t/cs0234-the-type-or-namespace-name-xna-does-not-exist-in-the-namespace-microsoft-are-you-missing-an-assembly-reference/16045/4
Unable to load DLL 'libmojoshader_64.dll' or one of its dependencies: Kan opgegeven module niet vinden. [Cannot find the requested module.] (0x8007007E) Unexpected error compiling
Symptom
On Windows 10 with Visual Studio 2022, shaders will not build. When attempting to build, an error message is displayed about libmojoshader_64.dll.
Solution - Install Visual Studio 2013 Redistributable
Your computer may be missing the file MSVCR120.dll. This can added by installing the Visual Studio 2013 Redistributable: https://aka.ms/highdpimfc2013x64enu
MGCB Doesn't Open
Symptom
Double clicking the Content.mgcb file should open the MonoGame Content Builder (MGCB). When attempting to open the MGCB nothing happens.
Solution - Install MGCB Locally
To install MGCB locally, run this command:
dotnet tool install dotnet-mgcb
The -g option installs globally which seems to not work.
Last updated