Building Content (Content Pipeline)
Last updated
Last updated
Building content in Visual Studio causes an error, and the error includes the string /@:
prior to the .mgcb path.
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:
On Windows 10 with Visual Studio 2022, shaders will not build. When attempting to build, an error message is displayed about libmojoshader_64.dll.
Double clicking the Content.mgcb file should open the MonoGame Content Builder (MGCB). When attempting to open the MGCB nothing happens.
To install MGCB locally, run this command:
dotnet tool install dotnet-mgcb
The -g option installs globally which seems to not work.
Your computer may be missing the file MSVCR120.dll. This can added by installing the Visual Studio 2013 Redistributable: