Skip to content

Commit 6cb98ec

Browse files
committed
Nupkg Restructure
Resolves #2156 Nuget packages updated to use ItemGroup None instead of Copy target Nuget props restructure to support Win32 target x86 and Win32 targets are exactly the same in content, they differ in name only, so switched to using an <Otherwise/> block Remove AnyCpu <When/> option from props files and consolidate with x86 and Win32. Set Private to false and rely on the <None/> entires to copy the files to the output folder Ideally would move the OffScreen, WinForms and WPF targets file content to the props (as they're actually props now), unfortunately we need guaranteed ordering and Nuget 2.8.x doesn't provide that, if we leave them as .targets it'll happen late enough to make sure the cef.redist list of files is provided. NuGet/Home#4229 (comment)
1 parent ebaa81f commit 6cb98ec

File tree

8 files changed

+174
-101
lines changed

8 files changed

+174
-101
lines changed

NuGet/CefSharp.Common.props

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,20 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Choose>
4-
<When Condition="'$(Platform)' == 'x86'">
5-
<ItemGroup>
6-
<Reference Include="CefSharp">
7-
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.dll</HintPath>
8-
<Private>True</Private>
9-
</Reference>
10-
<Reference Include="CefSharp.Core">
11-
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.Core.dll</HintPath>
12-
<Private>True</Private>
13-
</Reference>
14-
</ItemGroup>
15-
</When>
164
<When Condition="'$(Platform)' == 'x64'">
175
<ItemGroup>
186
<Reference Include="CefSharp">
197
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.dll</HintPath>
20-
<Private>True</Private>
8+
<Private>False</Private>
219
</Reference>
2210
<Reference Include="CefSharp.Core">
2311
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.Core.dll</HintPath>
24-
<Private>True</Private>
12+
<Private>False</Private>
2513
</Reference>
2614
</ItemGroup>
2715
</When>
28-
<When Condition="'$(Platform)' == 'AnyCPU'">
16+
<!-- x86, Win32 and AnyCpu -->
17+
<Otherwise>
2918
<ItemGroup>
3019
<Reference Include="CefSharp">
3120
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.dll</HintPath>
@@ -36,6 +25,6 @@
3625
<Private>False</Private>
3726
</Reference>
3827
</ItemGroup>
39-
</When>
28+
</Otherwise>
4029
</Choose>
4130
</Project>

NuGet/CefSharp.Common.targets

Lines changed: 42 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,38 +11,53 @@
1111
<ItemGroup>
1212
<CefSharpCommonBinaries32 Include="$(MSBuildThisFileDirectory)..\CefSharp\x86\*.*" />
1313
<CefSharpCommonBinaries64 Include="$(MSBuildThisFileDirectory)..\CefSharp\x64\*.*" />
14+
<CefSharpCommonBinariesAnyCpu Include="$(MSBuildThisFileDirectory)..\CefSharp\**\*.*" />
1415
</ItemGroup>
1516

1617
<PropertyGroup>
17-
<CefSharpTargetDir Condition=" '$(CefSharpTargetDir)' == '' ">$(TargetDir)</CefSharpTargetDir>
18+
<CefSharpTargetDir Condition=" '$(CefSharpTargetDir)' == '' "></CefSharpTargetDir>
1819
</PropertyGroup>
1920

20-
<Target Name="CefSharpCopyLibs86" BeforeTargets="BeforeBuild" Condition="('$(Platform)' == 'x86') OR ('$(Platform)' == 'Win32')">
21-
<Message Importance="high" Text="Copying cef.redist x86 files" />
22-
<Copy SourceFiles="@(CefRedist32)" DestinationFiles="@(CefRedist32->'$(CefSharpTargetDir)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
23-
24-
<Message Importance="high" Text="-- CefSharp.Common.targets: Copying files from $(MSBuildThisFileDirectory)..\CefSharp\x86 to $(CefSharpTargetDir)" />
25-
<Copy SourceFiles="@(CefSharpCommonBinaries32)" DestinationFolder="$(CefSharpTargetDir)" SkipUnchangedFiles="true" />
26-
</Target>
27-
28-
<Target Name="CefSharpCopyLibs64" BeforeTargets="BeforeBuild" Condition="'$(Platform)' == 'x64'">
29-
<Message Importance="high" Text="Copying cef.redist x64 files" />
30-
<Copy SourceFiles="@(CefRedist64)" DestinationFiles="@(CefRedist64->'$(CefSharpTargetDir)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
31-
32-
<Message Importance="high" Text="-- CefSharp.Common.targets: Copying files from $(MSBuildThisFileDirectory)..\CefSharp\x64 to $(CefSharpTargetDir)" />
33-
<Copy SourceFiles="@(CefSharpCommonBinaries64)" DestinationFolder="$(CefSharpTargetDir)" SkipUnchangedFiles="true" />
34-
</Target>
35-
36-
<Target Name="CefSharpCopyLibsAnyCPU" BeforeTargets="BeforeBuild" Condition="'$(Platform)' == 'AnyCPU'">
37-
<Message Importance="high" Text="Copying cef.redist x86 files" />
38-
<Copy SourceFiles="@(CefRedist32)" DestinationFiles="@(CefRedist32->'$(CefSharpTargetDir)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
21+
<!--
22+
These item groups should be in the .props file, unfortunately Nuget 2.8.x doesn't gurantee the
23+
correct ordering .props imports, which we require as this depends on the cef.redist packages
24+
exporting an ItemGroup
25+
-->
26+
27+
<ItemGroup Condition="('$(Platform)' == 'x86') OR ('$(Platform)' == 'Win32')">
28+
<None Include="@(CefRedist32)">
29+
<Link>$(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension)</Link>
30+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
31+
</None>
32+
<None Include="@(CefSharpCommonBinaries32)">
33+
<Link>$(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension)</Link>
34+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
35+
</None>
36+
</ItemGroup>
3937

40-
<Message Importance="high" Text="Copying cef.redist x64 files" />
41-
<Copy SourceFiles="@(CefRedist64)" DestinationFiles="@(CefRedist64->'$(CefSharpTargetDir)\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
38+
<ItemGroup Condition="'$(Platform)' == 'x64'">
39+
<None Include="@(CefRedist64)">
40+
<Link>$(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension)</Link>
41+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
42+
</None>
43+
<None Include="@(CefSharpCommonBinaries64)">
44+
<Link>$(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension)</Link>
45+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
46+
</None>
47+
</ItemGroup>
4248

43-
<Message Importance="high" Text="-- CefSharp.Common.targets: Copying files from $(MSBuildThisFileDirectory)..\CefSharp\x86 to $(CefSharpTargetDir)\x86" />
44-
<Copy SourceFiles="@(CefSharpCommonBinaries32)" DestinationFolder="$(CefSharpTargetDir)\x86" SkipUnchangedFiles="true" />
45-
<Message Importance="high" Text="-- CefSharp.Common.targets: Copying files from $(MSBuildThisFileDirectory)..\CefSharp\x64 to $(CefSharpTargetDir)\x64" />
46-
<Copy SourceFiles="@(CefSharpCommonBinaries64)" DestinationFolder="$(CefSharpTargetDir)\x64" SkipUnchangedFiles="true" />
47-
</Target>
49+
<ItemGroup Condition="'$(Platform)' == 'AnyCPU'">
50+
<None Include="@(CefRedist32)">
51+
<Link>$(CefSharpTargetDir)\x86\%(RecursiveDir)%(FileName)%(Extension)</Link>
52+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
53+
</None>
54+
<None Include="@(CefRedist64)">
55+
<Link>$(CefSharpTargetDir)\x64\%(RecursiveDir)%(FileName)%(Extension)</Link>
56+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
57+
</None>
58+
<None Include="@(CefSharpCommonBinariesAnyCpu)">
59+
<Link>$(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension)</Link>
60+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
61+
</None>
62+
</ItemGroup>
4863
</Project>

NuGet/CefSharp.OffScreen.props

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,22 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Choose>
4-
<When Condition="'$(Platform)' == 'x86'">
5-
<ItemGroup>
6-
<Reference Include="CefSharp.OffScreen">
7-
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.OffScreen.dll</HintPath>
8-
<Private>True</Private>
9-
</Reference>
10-
</ItemGroup>
11-
</When>
124
<When Condition="'$(Platform)' == 'x64'">
135
<ItemGroup>
146
<Reference Include="CefSharp.OffScreen">
157
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.OffScreen.dll</HintPath>
16-
<Private>True</Private>
8+
<Private>False</Private>
179
</Reference>
1810
</ItemGroup>
1911
</When>
20-
<When Condition="'$(Platform)' == 'AnyCPU'">
12+
<!-- x86, Win32 and AnyCpu -->
13+
<Otherwise>
2114
<ItemGroup>
2215
<Reference Include="CefSharp.OffScreen">
2316
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.OffScreen.dll</HintPath>
2417
<Private>False</Private>
2518
</Reference>
2619
</ItemGroup>
27-
</When>
20+
</Otherwise>
2821
</Choose>
2922
</Project>

NuGet/CefSharp.OffScreen.targets

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,48 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
4-
<CefSharpTargetDir Condition=" '$(CefSharpTargetDir)' == '' ">$(TargetDir)</CefSharpTargetDir>
4+
<CefSharpTargetDir Condition=" '$(CefSharpTargetDir)' == '' "></CefSharpTargetDir>
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<CefSharpOffscreenBinaries32 Include="$(MSBuildThisFileDirectory)..\CefSharp\x86\*.*" />
9-
<CefSharpOffscreenBinaries64 Include="$(MSBuildThisFileDirectory)..\CefSharp\x64\*.*" />
8+
<CefSharpOffScreenBinaries32 Include="$(MSBuildThisFileDirectory)..\CefSharp\x86\*.*" />
9+
<CefSharpOffScreenBinaries64 Include="$(MSBuildThisFileDirectory)..\CefSharp\x64\*.*" />
10+
<!-- Not currently used, might come in handy for someone though as it contains all x86 and x64 files -->
11+
<CefSharpOffscreenBinariesAnyCpu Include="$(MSBuildThisFileDirectory)..\CefSharp\**\*.*" />
1012
</ItemGroup>
1113

12-
<Target Name="CefSharpCopyOffScreenAnyCPU" BeforeTargets="BeforeBuild" Condition="'$(Platform)' == 'AnyCPU'">
13-
<Message Importance="high" Text="-- CefSharp.OffScreen.targets: Copying files from $(MSBuildThisFileDirectory)..\CefSharp\x86 to $(CefSharpTargetDir)\x86" />
14-
<Copy SourceFiles="@(CefSharpOffscreenBinaries32)" DestinationFolder="$(CefSharpTargetDir)\x86" SkipUnchangedFiles="true" />
15-
<Message Importance="high" Text="-- CefSharp.OffScreen.targets: Copying files from $(MSBuildThisFileDirectory)..\CefSharp\x64 to $(CefSharpTargetDir)\x64" />
16-
<Copy SourceFiles="@(CefSharpOffscreenBinaries64)" DestinationFolder="$(CefSharpTargetDir)\x64" SkipUnchangedFiles="true" />
17-
</Target>
14+
<!--
15+
These item groups should be in the .props file, unfortunately Nuget 2.8.x doesn't gurantee the
16+
correct ordering .props imports, which we require as this depends on the cef.redist packages
17+
exporting an ItemGroup
18+
-->
19+
20+
<!-- Copying all files here included those at are added As References so you can specify CefSharpTargetDir -->
21+
<Choose>
22+
<When Condition="'$(Platform)' == 'AnyCpu'">
23+
<ItemGroup>
24+
<None Include="@(CefSharpOffscreenBinariesAnyCpu)">
25+
<Link>$(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension)</Link>
26+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
27+
</None>
28+
</ItemGroup>
29+
</When>
30+
<When Condition="'$(Platform)' == 'x64'">
31+
<ItemGroup>
32+
<None Include="@(CefSharpOffScreenBinaries64)">
33+
<Link>$(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension)</Link>
34+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
35+
</None>
36+
</ItemGroup>
37+
</When>
38+
<!-- x86, and Win32 -->
39+
<Otherwise>
40+
<ItemGroup>
41+
<None Include="@(CefSharpOffScreenBinaries32)">
42+
<Link>$(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension)</Link>
43+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
44+
</None>
45+
</ItemGroup>
46+
</Otherwise>
47+
</Choose>
1848
</Project>

NuGet/CefSharp.WinForms.props

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,22 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Choose>
4-
<When Condition="'$(Platform)' == 'x86'">
5-
<ItemGroup>
6-
<Reference Include="CefSharp.WinForms">
7-
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.WinForms.dll</HintPath>
8-
<Private>True</Private>
9-
</Reference>
10-
</ItemGroup>
11-
</When>
124
<When Condition="'$(Platform)' == 'x64'">
135
<ItemGroup>
146
<Reference Include="CefSharp.WinForms">
157
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.WinForms.dll</HintPath>
16-
<Private>True</Private>
8+
<Private>False</Private>
179
</Reference>
1810
</ItemGroup>
1911
</When>
20-
<When Condition="'$(Platform)' == 'AnyCPU'">
12+
<!-- x86, Win32 and AnyCpu -->
13+
<Otherwise>
2114
<ItemGroup>
2215
<Reference Include="CefSharp.WinForms">
2316
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.WinForms.dll</HintPath>
2417
<Private>False</Private>
2518
</Reference>
2619
</ItemGroup>
27-
</When>
20+
</Otherwise>
2821
</Choose>
2922
</Project>

NuGet/CefSharp.WinForms.targets

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,48 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
4-
<CefSharpTargetDir Condition=" '$(CefSharpTargetDir)' == '' ">$(TargetDir)</CefSharpTargetDir>
4+
<CefSharpTargetDir Condition=" '$(CefSharpTargetDir)' == '' "></CefSharpTargetDir>
55
</PropertyGroup>
66

77
<ItemGroup>
88
<CefSharpWinFormsBinaries32 Include="$(MSBuildThisFileDirectory)..\CefSharp\x86\*.*" />
99
<CefSharpWinFormsBinaries64 Include="$(MSBuildThisFileDirectory)..\CefSharp\x64\*.*" />
10+
<!-- Not currently used, might come in handy for someone though as it contains all x86 and x64 files -->
11+
<CefSharpWinFormsBinariesAnyCpu Include="$(MSBuildThisFileDirectory)..\CefSharp\**\*.*" />
1012
</ItemGroup>
11-
12-
<Target Name="CefSharpCopyWinFormsAnyCPU" BeforeTargets="BeforeBuild" Condition="'$(Platform)' == 'AnyCPU'">
13-
<Message Importance="high" Text="-- CefSharp.WinForms.targets: Copying files from $(MSBuildThisFileDirectory)..\CefSharp\x86 to $(CefSharpTargetDir)\x86" />
14-
<Copy SourceFiles="@(CefSharpWinFormsBinaries32)" DestinationFolder="$(CefSharpTargetDir)\x86" SkipUnchangedFiles="true" />
15-
<Message Importance="high" Text="-- CefSharp.WinForms.targets: Copying files from $(MSBuildThisFileDirectory)..\CefSharp\x64 to $(CefSharpTargetDir)\x64" />
16-
<Copy SourceFiles="@(CefSharpWinFormsBinaries64)" DestinationFolder="$(CefSharpTargetDir)\x64" SkipUnchangedFiles="true" />
17-
</Target>
13+
14+
<!--
15+
These item groups should be in the .props file, unfortunately Nuget 2.8.x doesn't gurantee the
16+
correct ordering .props imports, which we require as this depends on the cef.redist packages
17+
exporting an ItemGroup
18+
-->
19+
20+
<!-- Copying all files here included those at are added As References so you can specify CefSharpTargetDir -->
21+
<Choose>
22+
<When Condition="'$(Platform)' == 'AnyCpu'">
23+
<ItemGroup>
24+
<None Include="@(CefSharpWinFormsBinariesAnyCpu)">
25+
<Link>$(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension)</Link>
26+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
27+
</None>
28+
</ItemGroup>
29+
</When>
30+
<When Condition="'$(Platform)' == 'x64'">
31+
<ItemGroup>
32+
<None Include="@(CefSharpWinFormsBinaries64)">
33+
<Link>$(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension)</Link>
34+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
35+
</None>
36+
</ItemGroup>
37+
</When>
38+
<!-- x86, and Win32 -->
39+
<Otherwise>
40+
<ItemGroup>
41+
<None Include="@(CefSharpWinFormsBinaries32)">
42+
<Link>$(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension)</Link>
43+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
44+
</None>
45+
</ItemGroup>
46+
</Otherwise>
47+
</Choose>
1848
</Project>

NuGet/CefSharp.Wpf.props

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,22 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<Choose>
4-
<When Condition="'$(Platform)' == 'x86'">
5-
<ItemGroup>
6-
<Reference Include="CefSharp.Wpf">
7-
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.Wpf.dll</HintPath>
8-
<Private>True</Private>
9-
</Reference>
10-
</ItemGroup>
11-
</When>
124
<When Condition="'$(Platform)' == 'x64'">
135
<ItemGroup>
146
<Reference Include="CefSharp.Wpf">
157
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x64\CefSharp.Wpf.dll</HintPath>
16-
<Private>True</Private>
8+
<Private>False</Private>
179
</Reference>
1810
</ItemGroup>
1911
</When>
20-
<When Condition="'$(Platform)' == 'AnyCPU'">
12+
<!-- x86, Win32 and AnyCpu -->
13+
<Otherwise>
2114
<ItemGroup>
2215
<Reference Include="CefSharp.Wpf">
2316
<HintPath>$(MSBuildThisFileDirectory)..\CefSharp\x86\CefSharp.Wpf.dll</HintPath>
2417
<Private>False</Private>
2518
</Reference>
2619
</ItemGroup>
27-
</When>
20+
</Otherwise>
2821
</Choose>
2922
</Project>

NuGet/CefSharp.Wpf.targets

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,48 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
4-
<CefSharpTargetDir Condition=" '$(CefSharpTargetDir)' == '' ">$(TargetDir)</CefSharpTargetDir>
4+
<CefSharpTargetDir Condition=" '$(CefSharpTargetDir)' == '' "></CefSharpTargetDir>
55
</PropertyGroup>
66

77
<ItemGroup>
88
<CefSharpWpfBinaries32 Include="$(MSBuildThisFileDirectory)..\CefSharp\x86\*.*" />
99
<CefSharpWpfBinaries64 Include="$(MSBuildThisFileDirectory)..\CefSharp\x64\*.*" />
10+
<!-- Not currently used, might come in handy for someone though as it contains all x86 and x64 files -->
11+
<CefSharpWpfBinariesAnyCpu Include="$(MSBuildThisFileDirectory)..\CefSharp\**\*.*" />
1012
</ItemGroup>
11-
12-
<Target Name="CefSharpCopyWpfAnyCPU" BeforeTargets="BeforeBuild" Condition="'$(Platform)' == 'AnyCPU'">
13-
<Message Importance="high" Text="-- CefSharp.Wpf.targets: Copying files from $(MSBuildThisFileDirectory)..\CefSharp\x86 to $(CefSharpTargetDir)\x86" />
14-
<Copy SourceFiles="@(CefSharpWpfBinaries32)" DestinationFolder="$(CefSharpTargetDir)\x86" SkipUnchangedFiles="true" />
15-
<Message Importance="high" Text="-- CefSharp.Wpf.targets: Copying files from $(MSBuildThisFileDirectory)..\CefSharp\x64 to $(CefSharpTargetDir)\x64" />
16-
<Copy SourceFiles="@(CefSharpWpfBinaries64)" DestinationFolder="$(CefSharpTargetDir)\x64" SkipUnchangedFiles="true" />
17-
</Target>
13+
14+
<!--
15+
These item groups should be in the .props file, unfortunately Nuget 2.8.x doesn't gurantee the
16+
correct ordering .props imports, which we require as this depends on the cef.redist packages
17+
exporting an ItemGroup
18+
-->
19+
20+
<!-- Copying all files here included those at are added As References so you can specify CefSharpTargetDir -->
21+
<Choose>
22+
<When Condition="'$(Platform)' == 'AnyCpu'">
23+
<ItemGroup>
24+
<None Include="@(CefSharpWpfBinariesAnyCpu)">
25+
<Link>$(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension)</Link>
26+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
27+
</None>
28+
</ItemGroup>
29+
</When>
30+
<When Condition="'$(Platform)' == 'x64'">
31+
<ItemGroup>
32+
<None Include="@(CefSharpWpfBinaries64)">
33+
<Link>$(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension)</Link>
34+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
35+
</None>
36+
</ItemGroup>
37+
</When>
38+
<!-- x86, and Win32 -->
39+
<Otherwise>
40+
<ItemGroup>
41+
<None Include="@(CefSharpWpfBinaries32)">
42+
<Link>$(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension)</Link>
43+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
44+
</None>
45+
</ItemGroup>
46+
</Otherwise>
47+
</Choose>
1848
</Project>

0 commit comments

Comments
 (0)