[SOLVED] Shader compile successful in Content Builder Editor but fails in IDE project build

This is a duplicate of a question I’ve asked on Reddit. I’m thinking I should have posted here first. If any solution comes up there, I’ll copy it here.

I’ve finally been able to get my Visual-Studio-created game building on Linux using the Rider IDE. My shaders compile successfully using the InfinitespaceStudios.Pipeline package. However I don’t like my project being dependent on an outside source, so I have been trying to get my shaders compiling without it. As instructed in the Monogame “getting started” guide, I have Wine installed. So I have now removed the dependency on Infinitespace.

Now, when I open the Content Builder Editor and build my shaders, everything succeeds. No warnings and no errors. However when I build my project in my IDE (Rider), I get a really unhelpful error for each shader:

BlackAndWhite.fx: [] Processor 'EffectProcessor' had unexpected failure!

Followed by this error:

MonoGame.Content.Builder.targets(90, 5): [MSB3073] The command "/usr/bin/mono "/usr/lib/mono/xbuild/MonoGame/v3.0/Tools/MGCB.exe" /@:"/home/andy/Development/Point-and-Click-Adventure/PACE/Content/Content.mgcb" /platform:DesktopGL /outputDir:"/home/andy/Development/Point-and-Click-Adventure/PACAdventure/Content/bin/DesktopGL" /intermediateDir:"/home/andy/Development/Point-and-Click-Adventure/PACAdventure/Content/obj/DesktopGL" /quiet" exited with code 3.

Does anyone know what the problem is?

[Edit]
I figured it out by accident. Another housekeeping task I wanted to complete was reconstructing my solution as .NET Core rather than .NET Framework. As I couldn’t figure out the shader problem, I went on to this reconstruction task. It turns out that doing this enabled shader compiling to work properly when building from within my IDE! I have no idea why, but there we are!