We have a project that creates a set of libraries that are later included in some external projects. Due to some conflicts (that happened when these external projects were used together) we were made to create a separate set of libraries dedicated specifically to a given project.
We end up with multiple conditions in our project file, e.g.:
<PropertyGroup Condition=" '$(DestinationName)' == 'Name1' ">
[...]
<AssemblyName>Name1-OurProject</AssemblyName>
<Version>1</Version>
</PropertyGroup>
<PropertyGroup Condition=" '$(DestinationName)' == 'Name2' ">
[...]
<AssemblyName>Name2-OurProject</AssemblyName>
<Version>2</Version>
</PropertyGroup>
And then we have to build separately for each external project:
dotnet build -property:DestinationName="Name1"
dotnet build -property:DestinationName="Name2"
Which means we build the exact same code multiple times.
Is there any way to avoid this? To somehow notify dotnet build that I need multiple library sets?