Does MSBuild consider whether a .vcxproj project is compiling to a static vs. dynamic lib when deducing build order?
For example, lets say I have four projects, which produce either a static or dynamic binary:
A.vcxproj -> A.lib
B.vcxproj -> B.dll
C.vcxproj -> C.lib
D.vcxproj -> D.dll
And that these projects have ProjectReferences defined like so:
<!-- For B.vcxproj -->
<PropertyGroup>
<ConfigurationType>DynamicLibrary</ConfigurationType>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="A.vcxproj"/>
</ItemGroup>
...such that it creates a dependency chain like this (where X -> Y
means "X
is a dependency of Y
"):
A -> B -> C -> D
In other words...
A.lib -> B.dll -> C.lib -> D.dll
Static libraries aren't needed until they're linked into a dynamic library or executable. Knowing that, the most efficient build graph assuming you can have multiple builds running is:
A.lib -> B.dll -> D.dll
C.lib ---^
Will MSBuild recognize that this build ordering is possible if it's allowed to run multiple builds at once? Or will it simply build exactly how the project references are laid out?