Make Visual Studio C++ project with missing references link OK

  c++, solution, visual-studio

Context: Visual Studio 2019.

I have a suite of C++ projects that need to be compiled both into individual (plugin) DLLs, as well as be linked statically into a single application for testing purposes. For this purpose I have created two sets of configurations; "Plugin" and "Test". Under the "Plugin" configuration they compile and link into DLLs, while under the "Test" config they end up as static libs. So far so good.

I have also added the test app project to this solution, which has a reference to all of these plugin projects. Under the "Plugin" config this test app project is just set to not be built.

But I also have a much smaller solution which includes only a few plugin projects. My aim is to have a much quicker build cycle when working on the core framework of these plugins, while still being able to quickly test resulting binaries. A small change there means all plugin projects need to be rebuilt, which takes a lot of time. For the plugin config this works, but when building the test app project Visual Studio errors out about these missing references.

Is there some workable setup I can use? I could duplicate the test app project itself for this purpose, and give the copy less references, but I’d rather not to avoid duplicate maintenance. And I want to be free to just add any mix of plugin projects to the smaller solution, without having to update the project references.

Source: Windows Questions C++