Du to a weird dependency chain that I cannot break at the moment, I would like to build one C++ project as a "post build" step from another C++ project in the very same solution.
I know how to invoke MSBuild on the command line, but I figured it might make more sense to use the built-in MSBuild task to just trigger the build on the other project:
my.vcxproj:
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
...
<Target Name="BuildTheOtherProject" AfterTargets="Build">
<MSBuild Projects="..\theother\theother.vcxproj" Targets="Build" Properties="Configuration=$(Configuration);Platform=$(Platform)">
</MSBuild>
</Target>
</Project>
This seems to work fine on first glance, but will this continue to work (think: parallel project building of the full solution, etc.) and am I passing the correct values to the MSBuild task?
There is a related question that asks about the same thing for C# projects, and there seems to be a problem with csc (which is irrelevant for the vcxproj), so I'm wondering what the general stance is on this?
(I'm on Visual Studio 2015 atm.)