Prevent VS from always rebuilding projects that reference CefSharp when using AnyCPU platform (#2083)

* Replacing Condition with <Choose> tag

* Replacing Condition on references with <Choose> tag

* Replacing Condition on references with <Choose> tag

* Replacing Condition on references with <Choose> tag
This commit is contained in:
ymccready
2017-08-25 11:55:50 -04:00
committed by Chris
parent 2cb368016a
commit 2bdaa17d64
4 changed files with 116 additions and 69 deletions
+38 -26
View File
@@ -1,29 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Reference Include="CefSharp" Condition="'$(Platform)' == 'x86'">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CefSharp" Condition="'$(Platform)' == 'x64'">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CefSharp" Condition="'$(Platform)' == 'AnyCPU'">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="CefSharp.Core" Condition="'$(Platform)' == 'x86'">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CefSharp.Core" Condition="'$(Platform)' == 'x64'">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CefSharp.Core" Condition="'$(Platform)' == 'AnyCPU'">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.Core.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<Choose>
<When Condition="'$(Platform)' == 'x86'">
<ItemGroup>
<Reference Include="CefSharp">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CefSharp.Core">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.Core.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
</When>
<When Condition="'$(Platform)' == 'x64'">
<ItemGroup>
<Reference Include="CefSharp">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CefSharp.Core">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.Core.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
</When>
<When Condition="'$(Platform)' == 'AnyCPU'">
<ItemGroup>
<Reference Include="CefSharp">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="CefSharp.Core">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.Core.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
</When>
</Choose>
</Project>
+26 -15
View File
@@ -1,18 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Reference Include="CefSharp.OffScreen" Condition="'$(Platform)' == 'x86'">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.OffScreen.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CefSharp.OffScreen" Condition="'$(Platform)' == 'x64'">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.OffScreen.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CefSharp.OffScreen" Condition="'$(Platform)' == 'AnyCPU'">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.OffScreen.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<Choose>
<When Condition="'$(Platform)' == 'x86'">
<ItemGroup>
<Reference Include="CefSharp.OffScreen">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.OffScreen.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
</When>
<When Condition="'$(Platform)' == 'x64'">
<ItemGroup>
<Reference Include="CefSharp.OffScreen">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.OffScreen.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
</When>
<When Condition="'$(Platform)' == 'AnyCPU'">
<ItemGroup>
<Reference Include="CefSharp.OffScreen">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.OffScreen.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
</When>
</Choose>
</Project>
+26 -14
View File
@@ -1,17 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Reference Include="CefSharp.WinForms" Condition="'$(Platform)' == 'x86'">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.WinForms.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CefSharp.WinForms" Condition="'$(Platform)' == 'x64'">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.WinForms.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CefSharp.WinForms" Condition="'$(Platform)' == 'AnyCPU'">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.WinForms.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<Choose>
<When Condition="'$(Platform)' == 'x86'">
<ItemGroup>
<Reference Include="CefSharp.WinForms">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.WinForms.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
</When>
<When Condition="'$(Platform)' == 'x64'">
<ItemGroup>
<Reference Include="CefSharp.WinForms">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.WinForms.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
</When>
<When Condition="'$(Platform)' == 'AnyCPU'">
<ItemGroup>
<Reference Include="CefSharp.WinForms">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.WinForms.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
</When>
</Choose>
</Project>
+26 -14
View File
@@ -1,17 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Reference Include="CefSharp.Wpf" Condition="'$(Platform)' == 'x86'">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.Wpf.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CefSharp.Wpf" Condition="'$(Platform)' == 'x64'">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.Wpf.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CefSharp.Wpf" Condition="'$(Platform)' == 'AnyCPU'">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.Wpf.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<Choose>
<When Condition="'$(Platform)' == 'x86'">
<ItemGroup>
<Reference Include="CefSharp.Wpf">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.Wpf.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
</When>
<When Condition="'$(Platform)' == 'x64'">
<ItemGroup>
<Reference Include="CefSharp.Wpf">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.Wpf.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
</When>
<When Condition="'$(Platform)' == 'AnyCPU'">
<ItemGroup>
<Reference Include="CefSharp.Wpf">
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.Wpf.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
</When>
</Choose>
</Project>