Skip to content

Commit 981a684

Browse files
authored
Merge a14711a into 9d4bc5d
2 parents 9d4bc5d + a14711a commit 981a684

18 files changed

+351
-173
lines changed

CefSharp3.sln

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,26 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CefSharp.WinForms.Example",
4242
EndProject
4343
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGet", "NuGet", "{A23AA466-1903-44F2-946D-25AD0500D56B}"
4444
ProjectSection(SolutionItems) = preProject
45+
NuGet\CefSharp.Common.app.config.x64.transform = NuGet\CefSharp.Common.app.config.x64.transform
46+
NuGet\CefSharp.Common.app.config.x86.transform = NuGet\CefSharp.Common.app.config.x86.transform
4547
NuGet\CefSharp.Common.nuspec = NuGet\CefSharp.Common.nuspec
4648
NuGet\CefSharp.Common.props = NuGet\CefSharp.Common.props
4749
NuGet\CefSharp.Common.targets = NuGet\CefSharp.Common.targets
50+
NuGet\CefSharp.OffScreen.app.config.x64.transform = NuGet\CefSharp.OffScreen.app.config.x64.transform
51+
NuGet\CefSharp.OffScreen.app.config.x86.transform = NuGet\CefSharp.OffScreen.app.config.x86.transform
4852
NuGet\CefSharp.OffScreen.nuspec = NuGet\CefSharp.OffScreen.nuspec
4953
NuGet\CefSharp.OffScreen.props = NuGet\CefSharp.OffScreen.props
54+
NuGet\CefSharp.OffScreen.targets = NuGet\CefSharp.OffScreen.targets
55+
NuGet\CefSharp.WinForms.app.config.x64.transform = NuGet\CefSharp.WinForms.app.config.x64.transform
56+
NuGet\CefSharp.WinForms.app.config.x86.transform = NuGet\CefSharp.WinForms.app.config.x86.transform
5057
NuGet\CefSharp.WinForms.nuspec = NuGet\CefSharp.WinForms.nuspec
5158
NuGet\CefSharp.WinForms.props = NuGet\CefSharp.WinForms.props
59+
NuGet\CefSharp.WinForms.targets = NuGet\CefSharp.WinForms.targets
60+
NuGet\CefSharp.Wpf.app.config.x64.transform = NuGet\CefSharp.Wpf.app.config.x64.transform
61+
NuGet\CefSharp.Wpf.app.config.x86.transform = NuGet\CefSharp.Wpf.app.config.x86.transform
5262
NuGet\CefSharp.Wpf.nuspec = NuGet\CefSharp.Wpf.nuspec
5363
NuGet\CefSharp.Wpf.props = NuGet\CefSharp.Wpf.props
64+
NuGet\CefSharp.Wpf.targets = NuGet\CefSharp.Wpf.targets
5465
NuGet\Readme.txt = NuGet\Readme.txt
5566
EndProjectSection
5667
EndProject
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1">
3+
<!-- Add the runtime section if missing. -->
4+
<runtime xdt:Transform="InsertIfMissing"/>
5+
6+
<runtime>
7+
<!-- Add the assemblyBinding section if missing. -->
8+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" xdt:Transform="InsertIfMissing"/>
9+
</runtime>
10+
11+
<runtime>
12+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
13+
<!-- Remove the dependentAssembly section for CefSharp.Core if present. -->
14+
<dependentAssembly xdt:Transform="Remove" xdt:Locator="Condition(asmv1:assemblyIdentity/@processorArchitecture='x64' and asmv1:assemblyIdentity/@name='CefSharp.Core')"/>
15+
16+
<!-- Add the dependentAssembly section for CefSharp.Core if missing. -->
17+
<dependentAssembly xdt:Transform="InsertIfMissing" xdt:Locator="Condition(asmv1:assemblyIdentity/@processorArchitecture='x64' and asmv1:assemblyIdentity/@name='CefSharp.Core')">
18+
<assemblyIdentity name="CefSharp.Core" processorArchitecture="x64" publicKeyToken="40c4b6fc221f4138" culture="neutral"/>
19+
<codeBase version="83.4.2.0" href="x64/CefSharp.Core.dll"/>
20+
</dependentAssembly>
21+
22+
<!-- Remove the dependentAssembly section for CefSharp if present. -->
23+
<dependentAssembly xdt:Transform="Remove" xdt:Locator="Condition(asmv1:assemblyIdentity/@processorArchitecture='x64' and asmv1:assemblyIdentity/@name='CefSharp')"/>
24+
25+
<!-- Add the dependentAssembly section for CefSharp if missing. -->
26+
<dependentAssembly xdt:Transform="InsertIfMissing" xdt:Locator="Condition(asmv1:assemblyIdentity/@processorArchitecture='x64' and asmv1:assemblyIdentity/@name='CefSharp')">
27+
<assemblyIdentity name="CefSharp" processorArchitecture="x64" publicKeyToken="40c4b6fc221f4138" culture="neutral"/>
28+
<codeBase version="83.4.2.0" href="x64/CefSharp.dll"/>
29+
</dependentAssembly>
30+
31+
<!-- Remove the dependentAssembly section for CefSharp.BrowserSubprocess.Core if present. -->
32+
<dependentAssembly xdt:Transform="Remove" xdt:Locator="Condition(asmv1:assemblyIdentity/@processorArchitecture='x64' and asmv1:assemblyIdentity/@name='CefSharp.BrowserSubprocess.Core')"/>
33+
34+
<!-- Add the dependentAssembly section for CefSharp.BrowserSubprocess.Core if missing. -->
35+
<dependentAssembly xdt:Transform="InsertIfMissing" xdt:Locator="Condition(asmv1:assemblyIdentity/@processorArchitecture='x64' and asmv1:assemblyIdentity/@name='CefSharp.BrowserSubprocess.Core')">
36+
<assemblyIdentity name="CefSharp.BrowserSubprocess.Core" processorArchitecture="x64" publicKeyToken="40c4b6fc221f4138" culture="neutral"/>
37+
<codeBase version="83.4.2.0" href="x64/CefSharp.BrowserSubprocess.Core.dll"/>
38+
</dependentAssembly>
39+
</assemblyBinding>
40+
</runtime>
41+
</configuration>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1">
3+
<!-- Add the runtime section if missing. -->
4+
<runtime xdt:Transform="InsertIfMissing"/>
5+
6+
<runtime>
7+
<!-- Add the assemblyBinding section if missing. -->
8+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" xdt:Transform="InsertIfMissing"/>
9+
</runtime>
10+
11+
<runtime>
12+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
13+
<!-- Remove the dependentAssembly section for CefSharp.Core if present. -->
14+
<dependentAssembly xdt:Transform="Remove" xdt:Locator="Condition(asmv1:assemblyIdentity/@processorArchitecture='x86' and asmv1:assemblyIdentity/@name='CefSharp.Core')"/>
15+
16+
<!-- Add the dependentAssembly section for CefSharp.Core if missing. -->
17+
<dependentAssembly xdt:Transform="InsertIfMissing" xdt:Locator="Condition(asmv1:assemblyIdentity/@processorArchitecture='x86' and asmv1:assemblyIdentity/@name='CefSharp.Core')">
18+
<assemblyIdentity name="CefSharp.Core" processorArchitecture="x86" publicKeyToken="40c4b6fc221f4138" culture="neutral"/>
19+
<codeBase version="83.4.2.0" href="x86/CefSharp.Core.dll"/>
20+
</dependentAssembly>
21+
22+
<!-- Remove the dependentAssembly section for CefSharp if present. -->
23+
<dependentAssembly xdt:Transform="Remove" xdt:Locator="Condition(asmv1:assemblyIdentity/@processorArchitecture='x86' and asmv1:assemblyIdentity/@name='CefSharp')"/>
24+
25+
<!-- Add the dependentAssembly section for CefSharp if missing. -->
26+
<dependentAssembly xdt:Transform="InsertIfMissing" xdt:Locator="Condition(asmv1:assemblyIdentity/@processorArchitecture='x86' and asmv1:assemblyIdentity/@name='CefSharp')">
27+
<assemblyIdentity name="CefSharp" processorArchitecture="x86" publicKeyToken="40c4b6fc221f4138" culture="neutral"/>
28+
<codeBase version="83.4.2.0" href="x86/CefSharp.dll"/>
29+
</dependentAssembly>
30+
31+
<!-- Remove the dependentAssembly section for CefSharp.BrowserSubprocess.Core if present. -->
32+
<dependentAssembly xdt:Transform="Remove" xdt:Locator="Condition(asmv1:assemblyIdentity/@processorArchitecture='x86' and asmv1:assemblyIdentity/@name='CefSharp.BrowserSubprocess.Core')"/>
33+
34+
<!-- Add the dependentAssembly section for CefSharp.BrowserSubprocess.Core if missing. -->
35+
<dependentAssembly xdt:Transform="InsertIfMissing" xdt:Locator="Condition(asmv1:assemblyIdentity/@processorArchitecture='x86' and asmv1:assemblyIdentity/@name='CefSharp.BrowserSubprocess.Core')">
36+
<assemblyIdentity name="CefSharp.BrowserSubprocess.Core" processorArchitecture="x86" publicKeyToken="40c4b6fc221f4138" culture="neutral"/>
37+
<codeBase version="83.4.2.0" href="x86/CefSharp.BrowserSubprocess.Core.dll"/>
38+
</dependentAssembly>
39+
</assemblyBinding>
40+
</runtime>
41+
</configuration>

NuGet/CefSharp.Common.nuspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949

5050
<file src="CefSharp.Common.props" target="build" />
5151
<file src="CefSharp.Common.targets" target="build" />
52+
<file src="CefSharp.Common.app.config.x86.transform" target="build\app.config.x86.transform" />
53+
<file src="CefSharp.Common.app.config.x64.transform" target="build\app.config.x64.transform" />
5254

5355
<file src="..\CefSharp\**\*.cs" target="src\CefSharp" />
5456
<file src="..\CefSharp.Core\**\*.h" target="src\CefSharp.Core" />

NuGet/CefSharp.Common.targets

Lines changed: 13 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,49 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Target Name="PlatformCheck" BeforeTargets="ResolveAssemblyReferences" Condition="(('$(Platform)' != 'x86') AND ('$(Platform)' != 'x64') AND ('$(Platform)' != 'Win32') AND '$(CefSharpAnyCpuSupport)' != 'true')">
4-
<Error Text="$(MSBuildThisFileName) is unable to proceeed as your current Platform is '$(Platform)'. To target AnyCPU please read https://github.com/cefsharp/CefSharp/issues/1714. Alternatively change your Platform to x86 or x64 and the relevant files will be copied automatically. For details on changing your projects Platform see https://docs.microsoft.com/en-gb/visualstudio/ide/how-to-configure-projects-to-target-platforms?view=vs-2017" HelpKeyword="CefSharpSolutionPlatformCheck" />
5-
</Target>
6-
73
<Target Name="FrameworkVersionCheck" BeforeTargets="ResolveAssemblyReferences" Condition="(('$(TargetFrameworkVersion)' == 'v4.5.1') OR ('$(TargetFrameworkVersion)' == 'v4.5') OR ('$(TargetFrameworkVersion)' == 'v4.0'))">
84
<Error Text="CefSharp requires .Net 4.5.2 or higher" />
95
</Target>
106

11-
<PropertyGroup>
12-
<CefSharpTargetDir Condition=" '$(CefSharpTargetDir)' == '' ">.</CefSharpTargetDir>
13-
</PropertyGroup>
14-
157
<!--
168
These item groups should be in the .props file, unfortunately Nuget 2.8.x doesn't gurantee the
179
correct ordering .props imports, which we require as this depends on the cef.redist packages
1810
exporting an ItemGroup
1911
-->
20-
21-
<ItemGroup Condition="('$(Platform)' == 'x86') OR ('$(Platform)' == 'Win32')">
12+
<ItemGroup Condition="('$(Platform)' == 'AnyCPU') OR ('$(Platform)' == 'x86') OR ('$(Platform)' == 'Win32')">
2213
<None Include="@(CefRedist32)">
23-
<Link>$(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension)</Link>
14+
<Link>x86\%(RecursiveDir)%(FileName)%(Extension)</Link>
2415
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
2516
<PublishState>Include</PublishState>
2617
<Visible>false</Visible>
2718
</None>
2819
<None Include="@(CefSharpCommonBinaries32)">
29-
<Link>$(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension)</Link>
20+
<Link>x86\%(RecursiveDir)%(FileName)%(Extension)</Link>
3021
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
3122
<PublishState>Include</PublishState>
3223
<Visible>false</Visible>
3324
</None>
3425
</ItemGroup>
3526

36-
<ItemGroup Condition="'$(Platform)' == 'x64'">
27+
<ItemGroup Condition="('$(Platform)' == 'AnyCPU') OR ('$(Platform)' == 'x64')">
3728
<None Include="@(CefRedist64)">
38-
<Link>$(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension)</Link>
29+
<Link>x64\%(RecursiveDir)%(FileName)%(Extension)</Link>
3930
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
4031
<PublishState>Include</PublishState>
4132
<Visible>false</Visible>
4233
</None>
4334
<None Include="@(CefSharpCommonBinaries64)">
44-
<Link>$(CefSharpTargetDir)\%(RecursiveDir)%(FileName)%(Extension)</Link>
35+
<Link>x64\%(RecursiveDir)%(FileName)%(Extension)</Link>
4536
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
4637
<PublishState>Include</PublishState>
4738
<Visible>false</Visible>
4839
</None>
4940
</ItemGroup>
5041

51-
<ItemGroup Condition="'$(Platform)' == 'AnyCPU'">
52-
<None Include="@(CefRedist32)">
53-
<Link>$(CefSharpTargetDir)\x86\%(RecursiveDir)%(FileName)%(Extension)</Link>
54-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
55-
<PublishState>Include</PublishState>
56-
<Visible>false</Visible>
57-
</None>
58-
<None Include="@(CefRedist64)">
59-
<Link>$(CefSharpTargetDir)\x64\%(RecursiveDir)%(FileName)%(Extension)</Link>
60-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
61-
<PublishState>Include</PublishState>
62-
<Visible>false</Visible>
63-
</None>
64-
<None Include="@(CefSharpCommonBinaries32)">
65-
<Link>$(CefSharpTargetDir)\x86\%(RecursiveDir)%(FileName)%(Extension)</Link>
66-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
67-
<PublishState>Include</PublishState>
68-
<Visible>false</Visible>
69-
</None>
70-
<None Include="@(CefSharpCommonBinaries64)">
71-
<Link>$(CefSharpTargetDir)\x64\%(RecursiveDir)%(FileName)%(Extension)</Link>
72-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
73-
<PublishState>Include</PublishState>
74-
<Visible>false</Visible>
75-
</None>
76-
</ItemGroup>
42+
<UsingTask TaskName="TransformXml" AssemblyFile="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Web\Microsoft.Web.Publishing.Tasks.dll" />
43+
<Target Name="CefSharpCommon_TransformX86Config" Condition="('$(Platform)' == 'AnyCPU') OR ('$(Platform)' == 'x86') OR ('$(Platform)' == 'Win32')" AfterTargets="_CopyAppConfigFile">
44+
<TransformXml Source="@(AppConfigWithTargetPath->'$(OutDir)%(TargetPath)')" Transform="$(MSBuildThisFileDirectory)app.config.x86.transform" Destination="@(AppConfigWithTargetPath->'$(OutDir)%(TargetPath)')"/>
45+
</Target>
46+
<Target Name="CefSharpCommon_TransformX64Config" Condition="('$(Platform)' == 'AnyCPU') OR ('$(Platform)' == 'x64')" AfterTargets="_CopyAppConfigFile">
47+
<TransformXml Source="@(AppConfigWithTargetPath->'$(OutDir)%(TargetPath)')" Transform="$(MSBuildThisFileDirectory)app.config.x64.transform" Destination="@(AppConfigWithTargetPath->'$(OutDir)%(TargetPath)')"/>
48+
</Target>
7749
</Project>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1">
3+
<!-- Add the runtime section if missing. -->
4+
<runtime xdt:Transform="InsertIfMissing"/>
5+
6+
<runtime>
7+
<!-- Add the assemblyBinding section if missing. -->
8+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" xdt:Transform="InsertIfMissing"/>
9+
</runtime>
10+
11+
<runtime>
12+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
13+
<!-- Remove the dependentAssembly section for CefSharp.OffScreen if present. -->
14+
<dependentAssembly xdt:Transform="Remove" xdt:Locator="Condition(asmv1:assemblyIdentity/@processorArchitecture='x64' and asmv1:assemblyIdentity/@name='CefSharp.OffScreen')"/>
15+
16+
<!-- Add the dependentAssembly section for CefSharp.OffScreen if missing. -->
17+
<dependentAssembly xdt:Transform="InsertIfMissing" xdt:Locator="Condition(asmv1:assemblyIdentity/@processorArchitecture='x64' and asmv1:assemblyIdentity/@name='CefSharp.OffScreen')">
18+
<assemblyIdentity name="CefSharp.OffScreen" processorArchitecture="x64" publicKeyToken="40c4b6fc221f4138" culture="neutral"/>
19+
<codeBase version="83.4.2.0" href="x64/CefSharp.OffScreen.dll"/>
20+
</dependentAssembly>
21+
</assemblyBinding>
22+
</runtime>
23+
</configuration>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1">
3+
<!-- Add the runtime section if missing. -->
4+
<runtime xdt:Transform="InsertIfMissing"/>
5+
6+
<runtime>
7+
<!-- Add the assemblyBinding section if missing. -->
8+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" xdt:Transform="InsertIfMissing"/>
9+
</runtime>
10+
11+
<runtime>
12+
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
13+
<!-- Remove the dependentAssembly section for CefSharp.OffScreen if present. -->
14+
<dependentAssembly xdt:Transform="Remove" xdt:Locator="Condition(asmv1:assemblyIdentity/@processorArchitecture='x86' and asmv1:assemblyIdentity/@name='CefSharp.OffScreen')"/>
15+
16+
<!-- Add the dependentAssembly section for CefSharp.OffScreen if missing. -->
17+
<dependentAssembly xdt:Transform="InsertIfMissing" xdt:Locator="Condition(asmv1:assemblyIdentity/@processorArchitecture='x86' and asmv1:assemblyIdentity/@name='CefSharp.OffScreen')">
18+
<assemblyIdentity name="CefSharp.OffScreen" processorArchitecture="x86" publicKeyToken="40c4b6fc221f4138" culture="neutral"/>
19+
<codeBase version="83.4.2.0" href="x86/CefSharp.OffScreen.dll"/>
20+
</dependentAssembly>
21+
</assemblyBinding>
22+
</runtime>
23+
</configuration>

NuGet/CefSharp.OffScreen.nuspec

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939

4040
<file src="CefSharp.OffScreen.props" target="build" />
4141
<file src="CefSharp.OffScreen.targets" target="build" />
42+
<file src="CefSharp.OffScreen.app.config.x64.transform" target="build\app.config.x64.transform" />
43+
<file src="CefSharp.OffScreen.app.config.x86.transform" target="build\app.config.x86.transform" />
4244

4345
<file src="Readme.txt" target="" />
4446

0 commit comments

Comments
 (0)