Build a Windows project for Linux

I have a project that was originally made for Windows. I’d like to build it for Linux. I’ve set up Monogame on Linux and imported my VS porject into VS code, but I’m not sure where I need to change what targets to make it build correctly. Currently I’ve changed targets in the VS project away from Windows, but I’m struggling with getting the shader to build, as dotnet mgcb ends with code 2 (although it seems to only fail on the second shader?).

If anyone could guide me in the right direction, it would be much appreciated.

You can build for Linux from your Windows machine. Just setup a DesktopGL project, build your content with the Platform set to DesktopGL, then build the project targeting linux-x64.