Configuring Visual Studio Code for Multiple Builds with a Mesh Project

I am building a project that uses a Boron as a gateway for one or more Xenon leafs. I want to store the code for both the Boron and the Xenon code in the same git repo and set up a build that builds both images in Visual Studio. I could set up two workspaces in two instances of Visual Studio, but that seems suboptimal. It looks like I could set up a multi-root workspace.

What is the best way to configure a mesh project? Is there an example for a multi-root workspace for mesh? I didn’t see a tutorial and thought someone might have best practices to share.

Thanks!

Andrew

Not sure if this is the best way, but with a Workspace you can have many different project folders. When you compile or flash you then have to select the folder, either Server or Client in this example.

AFAIK the Workspaces/multiple folders approach is the only way to do what you want, at least for now (not that I see a problem with that!). I have a Workspace that contains the “Marco” Argon project folder and the “Polo” Xenon one and am able to work with each one independently.

Another possible approach is with conditional compilation and feature detection:

It’s not as pretty, perhaps, but it is “automatic” inasmuch as all you have to do is select which device you’re compiling for, clean, and rebuild.