Skip to content

Commit

Permalink
Prevent VS from always rebuilding projects that reference CefSharp wh…
Browse files Browse the repository at this point in the history
…en using AnyCPU platform (cefsharp#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
  • Loading branch information
ymccready authored and merceyz committed Aug 25, 2017
1 parent 2cb3680 commit 2bdaa17
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 69 deletions.
64 changes: 38 additions & 26 deletions NuGet/CefSharp.Common.props
Original file line number Diff line number Diff line change
@@ -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>
41 changes: 26 additions & 15 deletions NuGet/CefSharp.OffScreen.props
Original file line number Diff line number Diff line change
@@ -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>

40 changes: 26 additions & 14 deletions NuGet/CefSharp.WinForms.props
Original file line number Diff line number Diff line change
@@ -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>
40 changes: 26 additions & 14 deletions NuGet/CefSharp.Wpf.props
Original file line number Diff line number Diff line change
@@ -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>

0 comments on commit 2bdaa17

Please sign in to comment.