diff options
author | Katelyn Gadd <kg@luminance.org> | 2018-08-09 03:52:37 +0300 |
---|---|---|
committer | Alexander Köplinger <alex.koeplinger@outlook.com> | 2018-08-09 03:52:37 +0300 |
commit | 14d20074ffb298cc396916328897eac7f5f8c077 (patch) | |
tree | 62244a3aa5ae6c678b4ce0fa69b438c5fb8f6ccd /mcs/class/RabbitMQ.Client | |
parent | bd50f070bd693f64b2ceede91f9470ba0deb0aa1 (diff) |
Move to generating msbuild choose elements to get if-else selection behavior for sources in projects so that we don't get erroneous duplicate files in cases where there are both profile and host platform criteria (#9952)
A recent commit revealed that in cases where we select based on a mix of host platform and profile, genproj csproj files can end up with duplicate sources because the existing <ItemGroup Condition= approach could make multiple groups match for a given compile when we really just want one.
This PR changes to generating a cascade of msbuild <Choose> elements, which give if-else selection to ensure that we only ever build a single set of files.
Diffstat (limited to 'mcs/class/RabbitMQ.Client')
-rw-r--r-- | mcs/class/RabbitMQ.Client/src/apigen/RabbitMQ.Client.Apigen.csproj | 3 | ||||
-rw-r--r-- | mcs/class/RabbitMQ.Client/src/client/RabbitMQ.Client.csproj | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/mcs/class/RabbitMQ.Client/src/apigen/RabbitMQ.Client.Apigen.csproj b/mcs/class/RabbitMQ.Client/src/apigen/RabbitMQ.Client.Apigen.csproj index e74621bc3db..c2fdb9fcb3b 100644 --- a/mcs/class/RabbitMQ.Client/src/apigen/RabbitMQ.Client.Apigen.csproj +++ b/mcs/class/RabbitMQ.Client/src/apigen/RabbitMQ.Client.Apigen.csproj @@ -43,6 +43,7 @@ </PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
+ <!--Common files-->
<ItemGroup>
<Compile Include="..\client\api\AmqpTimestamp.cs" />
<Compile Include="..\client\api\IBasicConsumer.cs" />
@@ -65,7 +66,7 @@ <Compile Include="AmqpMethod.cs" />
<Compile Include="Apigen.cs" />
</ItemGroup>
- <ItemGroup></ItemGroup>
+ <!--End of common files-->
<!-- @ALL_SOURCES@ -->
<!-- @COMMON_PROJECT_REFERENCES@ -->
<ItemGroup Condition=" '$(Platform)' == 'net_4_x' ">
diff --git a/mcs/class/RabbitMQ.Client/src/client/RabbitMQ.Client.csproj b/mcs/class/RabbitMQ.Client/src/client/RabbitMQ.Client.csproj index ae4559a5db7..4f007abc674 100644 --- a/mcs/class/RabbitMQ.Client/src/client/RabbitMQ.Client.csproj +++ b/mcs/class/RabbitMQ.Client/src/client/RabbitMQ.Client.csproj @@ -49,6 +49,7 @@ <Compile Include="..\..\docs\specs\net_4_x-api-qpid-0-8.cs" />
</ItemGroup>
<!-- @BUILT_SOURCES@ -->
+ <!--Common files-->
<ItemGroup>
<Compile Include="..\..\..\..\build\common\Consts.cs" />
<Compile Include="..\util\BlockingCell.cs" />
@@ -175,15 +176,16 @@ <Compile Include="messagepatterns\SimpleRpcClient.cs" />
<Compile Include="messagepatterns\SimpleRpcServer.cs" />
<Compile Include="messagepatterns\Subscription.cs" />
+ <!--Genconsts dependency because this project includes Consts.cs-->
<ProjectReference Include="$(SolutionDir)\msvc\scripts\genconsts.csproj">
<Name>genconsts</Name>
<Project>{702AE2C0-71DD-4112-9A06-E4FABCA59986}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
- <Private>False</Private>
+ <Private>false</Private>
</ProjectReference>
</ItemGroup>
- <ItemGroup></ItemGroup>
+ <!--End of common files-->
<!-- @ALL_SOURCES@ -->
<!-- @COMMON_PROJECT_REFERENCES@ -->
<ItemGroup Condition=" '$(Platform)' == 'net_4_x' ">
|