Files
cefsharp/NuGet/CefSharp.OffScreen.targets
T
amaitland 6cb98ec81e 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.
https://github.com/NuGet/Home/issues/4229#issuecomment-271387190
2018-01-23 12:46:57 +10:00

49 lines
2.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CefSharpTargetDir Condition=" '$(CefSharpTargetDir)' == '' "></CefSharpTargetDir>
</PropertyGroup>
<ItemGroup>
<CefSharpOffScreenBinaries32 Include="$(MSBuildThisFileDirectory)..\CefSharp\x86\*.*" />
<CefSharpOffScreenBinaries64 Include="$(MSBuildThisFileDirectory)..\CefSharp\x64\*.*" />
<!-- Not currently used, might come in handy for someone though as it contains all x86 and x64 files -->
<CefSharpOffscreenBinariesAnyCpu Include="$(MSBuildThisFileDirectory)..\CefSharp\**\*.*" />
</ItemGroup>
<!--
These item groups should be in the .props file, unfortunately Nuget 2.8.x doesn't gurantee the
correct ordering .props imports, which we require as this depends on the cef.redist packages
exporting an ItemGroup
-->
<!-- Copying all files here included those at are added As References so you can specify CefSharpTargetDir -->
<Choose>
<When Condition="'$(Platform)' == 'AnyCpu'">
<ItemGroup>
<None Include="@(CefSharpOffscreenBinariesAnyCpu)">
<Link>$(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</When>
<When Condition="'$(Platform)' == 'x64'">
<ItemGroup>
<None Include="@(CefSharpOffScreenBinaries64)">
<Link>$(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</When>
<!-- x86, and Win32 -->
<Otherwise>
<ItemGroup>
<None Include="@(CefSharpOffScreenBinaries32)">
<Link>$(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Otherwise>
</Choose>
</Project>