I want to refer to the last paragraphs in the Documentation of the MGCB (MonoGame Content Builder) which says:
To_1:
Customizing your Build Process:
When building content from your project via msbuild there are a few ways to can hook into the build process. The MonoGame.Content.Builder.targets runs a target called
BuildContent just before your project builds.
If you want to do any processing before or after this process you can use the BeforeTargets and AfterTargets mechanism provided by msbuild to run your own targest.
If you want to customise the arguements sent to the MGCB.exe as part of the build process you can use the <MonoGameMGCBAdditionalArguments> property to define those.
For example if you wanted to pass in the current project configuration you could define:
<MonoGameMGCBAdditionalArguments>-config:$(Configuration)</MonoGameMGCBAdditionalArguments>
To_2:
Preprocessor Macros:
Preprocessor macros are intended to allow conditionals within a response file.
e.g:
$if <name>=<value>
$endif
sample:
<example command line>
MGCB.exe /define:BuildEffects=No /@:example.mgcb
<example.mgcb file>
$if BuildEffects=Yes
/importer:EffectImporter
/processor:EffectProcessor
/build:Effects\custom.fx
# all other effects here....
$endif