Skip to content

Commit 95f4288

Browse files
authored
Upgrade to 87.1.132 (#130)
* Upgrade to 87.1.12-CI3846 - Upgrade to Net Core 3.1 (Required to use new Net Core packages) - Migrate to NetCore specific pages * Upgrade to 87.1.130-pre * OffScreen - Remove UseWindowsForms from csproj file No longer required as we use the Drawing nuget package Also causes a problem with Console.ReadLine * README.md - Update Net Core Section * WinForms - Add new SdkStyle .Net 4.7.2 project and solution TODO: Add OffScreen and WPF project files * Upgrade to 87.1.131-pre * Upgrade to 87.1.132
1 parent 6b92ff6 commit 95f4288

18 files changed

+176
-298
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
[Oo]bj/
44
[Bb]in.netcore/
55
[Oo]bj.netcore/
6+
[Bb]in.net472/
7+
[Oo]bj.net472/
68

79
# mstest test results
810
TestResults

CefSharp.MinimalExample.OffScreen/CefSharp.MinimalExample.OffScreen.csproj

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\packages\CefSharp.OffScreen.86.0.241\build\CefSharp.OffScreen.props" Condition="Exists('..\packages\CefSharp.OffScreen.86.0.241\build\CefSharp.OffScreen.props')" />
4-
<Import Project="..\packages\CefSharp.Common.86.0.241\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.86.0.241\build\CefSharp.Common.props')" />
5-
<Import Project="..\packages\cef.redist.x86.86.0.24\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.86.0.24\build\cef.redist.x86.props')" />
6-
<Import Project="..\packages\cef.redist.x64.86.0.24\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.86.0.24\build\cef.redist.x64.props')" />
3+
<Import Project="..\packages\CefSharp.Common.87.1.132\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.87.1.132\build\CefSharp.Common.props')" />
4+
<Import Project="..\packages\cef.redist.x86.87.1.13\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.87.1.13\build\cef.redist.x86.props')" />
5+
<Import Project="..\packages\cef.redist.x64.87.1.13\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.87.1.13\build\cef.redist.x64.props')" />
76
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
87
<PropertyGroup>
98
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -65,6 +64,18 @@
6564
<ApplicationManifest>app.manifest</ApplicationManifest>
6665
</PropertyGroup>
6766
<ItemGroup>
67+
<Reference Include="CefSharp, Version=87.1.132.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138">
68+
<HintPath>..\packages\CefSharp.Common.87.1.132\lib\net452\CefSharp.dll</HintPath>
69+
<Private>True</Private>
70+
</Reference>
71+
<Reference Include="CefSharp.Core, Version=87.1.132.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138">
72+
<HintPath>..\packages\CefSharp.Common.87.1.132\lib\net452\CefSharp.Core.dll</HintPath>
73+
<Private>True</Private>
74+
</Reference>
75+
<Reference Include="CefSharp.OffScreen, Version=87.1.132.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138">
76+
<HintPath>..\packages\CefSharp.OffScreen.87.1.132\lib\net452\CefSharp.OffScreen.dll</HintPath>
77+
<Private>True</Private>
78+
</Reference>
6879
<Reference Include="System" />
6980
<Reference Include="System.Core" />
7081
<Reference Include="System.Drawing" />
@@ -83,6 +94,5 @@
8394
<None Include="packages.config" />
8495
</ItemGroup>
8596
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
86-
<Import Project="..\packages\CefSharp.Common.86.0.241\build\CefSharp.Common.targets" Condition="Exists('..\packages\CefSharp.Common.86.0.241\build\CefSharp.Common.targets')" />
87-
<Import Project="..\packages\CefSharp.OffScreen.86.0.241\build\CefSharp.OffScreen.targets" Condition="Exists('..\packages\CefSharp.OffScreen.86.0.241\build\CefSharp.OffScreen.targets')" />
97+
<Import Project="..\packages\CefSharp.Common.87.1.132\build\CefSharp.Common.targets" Condition="Exists('..\packages\CefSharp.Common.87.1.132\build\CefSharp.Common.targets')" />
8898
</Project>

CefSharp.MinimalExample.OffScreen/CefSharp.MinimalExample.OffScreen.netcore.csproj

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111

1212
<PropertyGroup>
1313
<OutputType>Exe</OutputType>
14-
<TargetFramework>netcoreapp3.0</TargetFramework>
15-
<UseWindowsForms>true</UseWindowsForms>
14+
<TargetFramework>netcoreapp3.1</TargetFramework>
1615
<RootNamespace>CefSharp.MinimalExample.OffScreen</RootNamespace>
1716
<ApplicationManifest>app.manifest</ApplicationManifest>
1817
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
@@ -29,44 +28,8 @@
2928
</ItemGroup>
3029

3130
<ItemGroup>
32-
<PackageReference Include="CefSharp.OffScreen" Version="86.0.241" />
31+
<PackageReference Include="CefSharp.OffScreen.NetCore" Version="87.1.132" />
3332
</ItemGroup>
34-
35-
<ItemGroup>
36-
<!-- TODO: These updates are currently required because CefSharp.OffScreen specifies
37-
<Private>false</Private>, which means these libraries will not be specified in
38-
the .deps.json file, and so the CoreCLR wouldn't load these. -->
39-
<Reference Update="CefSharp">
40-
<Private>true</Private>
41-
</Reference>
42-
<Reference Update="CefSharp.Core">
43-
<Private>true</Private>
44-
</Reference>
45-
<Reference Update="CefSharp.OffScreen">
46-
<Private>true</Private>
47-
</Reference>
48-
</ItemGroup>
49-
50-
<!-- Include CefSharp.BrowserSubprocess.Core so we can selfhost the BrowserSubProcess using our exe -->
51-
<Choose>
52-
<When Condition="'$(PlatformTarget)' == 'x64'">
53-
<ItemGroup>
54-
<Reference Include="CefSharp.BrowserSubprocess.Core">
55-
<HintPath>$(CefSharpBrowserProcessCore64)</HintPath>
56-
<Private>true</Private>
57-
</Reference>
58-
</ItemGroup>
59-
</When>
60-
<!-- x86, Win32 and AnyCPU -->
61-
<Otherwise>
62-
<ItemGroup>
63-
<Reference Include="CefSharp.BrowserSubprocess.Core">
64-
<HintPath>$(CefSharpBrowserProcessCore32)</HintPath>
65-
<Private>true</Private>
66-
</Reference>
67-
</ItemGroup>
68-
</Otherwise>
69-
</Choose>
7033

7134
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk.WindowsDesktop" />
7235
</Project>

CefSharp.MinimalExample.OffScreen/Program.cs

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,36 +23,21 @@ public static int Main(string[] args)
2323
Console.WriteLine("You may see Chromium debugging output, please wait...");
2424
Console.WriteLine();
2525

26-
#if NETCOREAPP
27-
//We are using our current exe as the BrowserSubProcess
28-
//Multiple instances will be spawned to handle all the
29-
//Chromium proceses, render, gpu, network, plugin, etc.
30-
var subProcessExe = new CefSharp.BrowserSubprocess.BrowserSubprocessExecutable();
31-
var result = subProcessExe.Main(args);
32-
if (result > 0)
33-
{
34-
return result;
35-
}
36-
#endif
37-
3826
var settings = new CefSettings()
3927
{
4028
//By default CefSharp will use an in-memory cache, you need to specify a Cache Folder to persist data
4129
CachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "CefSharp\\Cache")
4230
};
4331

32+
var dependencyCheck = true;
33+
4434
#if NETCOREAPP
45-
//We use our Applications exe as the BrowserSubProcess, multiple copies
46-
//will be spawned
47-
//TODO: The OffScreen implementation is crashing on Exit (WPF/WinForms are working fine).
48-
//So for now this is commented out and the old .Net CefSharp.BrowserSubProcess.exe
49-
//is used.
50-
//var exePath = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
51-
//settings.BrowserSubprocessPath = exePath;
35+
//This should be fixed shortly.
36+
dependencyCheck = false;
5237
#endif
5338

5439
//Perform dependency check to make sure all relevant resources are in our output directory.
55-
Cef.Initialize(settings, performDependencyCheck: true, browserProcessHandler: null);
40+
Cef.Initialize(settings, performDependencyCheck: dependencyCheck, browserProcessHandler: null);
5641

5742
// Create the offscreen Chromium browser.
5843
browser = new ChromiumWebBrowser(testUrl);
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="cef.redist.x64" version="86.0.24" targetFramework="net452" />
4-
<package id="cef.redist.x86" version="86.0.24" targetFramework="net452" />
5-
<package id="CefSharp.Common" version="86.0.241" targetFramework="net452" />
6-
<package id="CefSharp.OffScreen" version="86.0.241" targetFramework="net452" />
3+
<package id="cef.redist.x64" version="87.1.13" targetFramework="net452" />
4+
<package id="cef.redist.x86" version="87.1.13" targetFramework="net452" />
5+
<package id="CefSharp.Common" version="87.1.132" targetFramework="net452" />
6+
<package id="CefSharp.OffScreen" version="87.1.132" targetFramework="net452" />
77
</packages>

CefSharp.MinimalExample.WinForms/CefSharp.MinimalExample.WinForms.csproj

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\packages\CefSharp.WinForms.86.0.241\build\CefSharp.WinForms.props" Condition="Exists('..\packages\CefSharp.WinForms.86.0.241\build\CefSharp.WinForms.props')" />
4-
<Import Project="..\packages\CefSharp.Common.86.0.241\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.86.0.241\build\CefSharp.Common.props')" />
5-
<Import Project="..\packages\cef.redist.x86.86.0.24\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.86.0.24\build\cef.redist.x86.props')" />
6-
<Import Project="..\packages\cef.redist.x64.86.0.24\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.86.0.24\build\cef.redist.x64.props')" />
3+
<Import Project="..\packages\CefSharp.Common.87.1.132\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.87.1.132\build\CefSharp.Common.props')" />
4+
<Import Project="..\packages\cef.redist.x86.87.1.13\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.87.1.13\build\cef.redist.x86.props')" />
5+
<Import Project="..\packages\cef.redist.x64.87.1.13\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.87.1.13\build\cef.redist.x64.props')" />
76
<PropertyGroup>
87
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
98
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -56,6 +55,18 @@
5655
<ApplicationManifest>app.manifest</ApplicationManifest>
5756
</PropertyGroup>
5857
<ItemGroup>
58+
<Reference Include="CefSharp, Version=87.1.132.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138">
59+
<HintPath>..\packages\CefSharp.Common.87.1.132\lib\net452\CefSharp.dll</HintPath>
60+
<Private>True</Private>
61+
</Reference>
62+
<Reference Include="CefSharp.Core, Version=87.1.132.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138">
63+
<HintPath>..\packages\CefSharp.Common.87.1.132\lib\net452\CefSharp.Core.dll</HintPath>
64+
<Private>True</Private>
65+
</Reference>
66+
<Reference Include="CefSharp.WinForms, Version=87.1.132.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138">
67+
<HintPath>..\packages\CefSharp.WinForms.87.1.132\lib\net452\CefSharp.WinForms.dll</HintPath>
68+
<Private>True</Private>
69+
</Reference>
5970
<Reference Include="System" />
6071
<Reference Include="System.Core">
6172
<RequiredTargetFramework>3.5</RequiredTargetFramework>
@@ -113,6 +124,5 @@
113124
<None Include="Resources\chromium-256.png" />
114125
</ItemGroup>
115126
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
116-
<Import Project="..\packages\CefSharp.Common.86.0.241\build\CefSharp.Common.targets" Condition="Exists('..\packages\CefSharp.Common.86.0.241\build\CefSharp.Common.targets')" />
117-
<Import Project="..\packages\CefSharp.WinForms.86.0.241\build\CefSharp.WinForms.targets" Condition="Exists('..\packages\CefSharp.WinForms.86.0.241\build\CefSharp.WinForms.targets')" />
127+
<Import Project="..\packages\CefSharp.Common.87.1.132\build\CefSharp.Common.targets" Condition="Exists('..\packages\CefSharp.Common.87.1.132\build\CefSharp.Common.targets')" />
118128
</Project>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
<!-- Note: We cannot use the recommended style of specifying <Project Sdk=...> because we need
4+
to set BaseIntermediateOutputPath and BaseOutputPath before the SDK props are imported. -->
5+
<PropertyGroup>
6+
<BaseIntermediateOutputPath>obj.net472\</BaseIntermediateOutputPath>
7+
<BaseOutputPath>bin.net472\</BaseOutputPath>
8+
</PropertyGroup>
9+
10+
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk.WindowsDesktop" />
11+
12+
<PropertyGroup>
13+
<OutputType>WinExe</OutputType>
14+
<TargetFramework>net472</TargetFramework>
15+
<UseWindowsForms>true</UseWindowsForms>
16+
<RootNamespace>CefSharp.MinimalExample.WinForms</RootNamespace>
17+
<ApplicationManifest>app.manifest</ApplicationManifest>
18+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
19+
<Platforms>x86;x64</Platforms>
20+
<ProjectGuid>{1D1D63D1-5257-4AA0-A284-7EF4574878CB}</ProjectGuid>
21+
</PropertyGroup>
22+
23+
<ItemGroup>
24+
<Compile Remove="bin\**" />
25+
<Compile Remove="obj\**" />
26+
<EmbeddedResource Remove="bin\**" />
27+
<EmbeddedResource Remove="obj\**" />
28+
<None Remove="bin\**" />
29+
<None Remove="obj\**" />
30+
</ItemGroup>
31+
32+
<ItemGroup>
33+
<PackageReference Include="CefSharp.WinForms" Version="87.1.132" />
34+
</ItemGroup>
35+
36+
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk.WindowsDesktop" />
37+
</Project>

CefSharp.MinimalExample.WinForms/CefSharp.MinimalExample.WinForms.netcore.csproj

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<PropertyGroup>
1313
<OutputType>WinExe</OutputType>
14-
<TargetFramework>netcoreapp3.0</TargetFramework>
14+
<TargetFramework>netcoreapp3.1</TargetFramework>
1515
<UseWindowsForms>true</UseWindowsForms>
1616
<RootNamespace>CefSharp.MinimalExample.WinForms</RootNamespace>
1717
<ApplicationManifest>app.manifest</ApplicationManifest>
@@ -29,44 +29,8 @@
2929
</ItemGroup>
3030

3131
<ItemGroup>
32-
<PackageReference Include="CefSharp.WinForms" Version="86.0.241" />
32+
<PackageReference Include="CefSharp.WinForms.NetCore" Version="87.1.132" />
3333
</ItemGroup>
34-
35-
<ItemGroup>
36-
<!-- TODO: These updates are currently required because CefSharp.WinForms specifies
37-
<Private>false</Private>, which means these libraries will not be specified in
38-
the .deps.json file, and so the CoreCLR wouldn't load these. -->
39-
<Reference Update="CefSharp">
40-
<Private>true</Private>
41-
</Reference>
42-
<Reference Update="CefSharp.Core">
43-
<Private>true</Private>
44-
</Reference>
45-
<Reference Update="CefSharp.WinForms">
46-
<Private>true</Private>
47-
</Reference>
48-
</ItemGroup>
49-
50-
<!-- Include CefSharp.BrowserSubprocess.Core so we can selfhost the BrowserSubProcess using our exe -->
51-
<Choose>
52-
<When Condition="'$(PlatformTarget)' == 'x64'">
53-
<ItemGroup>
54-
<Reference Include="CefSharp.BrowserSubprocess.Core">
55-
<HintPath>$(CefSharpBrowserProcessCore64)</HintPath>
56-
<Private>true</Private>
57-
</Reference>
58-
</ItemGroup>
59-
</When>
60-
<!-- x86, Win32 and AnyCPU -->
61-
<Otherwise>
62-
<ItemGroup>
63-
<Reference Include="CefSharp.BrowserSubprocess.Core">
64-
<HintPath>$(CefSharpBrowserProcessCore32)</HintPath>
65-
<Private>true</Private>
66-
</Reference>
67-
</ItemGroup>
68-
</Otherwise>
69-
</Choose>
7034

7135
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk.WindowsDesktop" />
7236
</Project>

CefSharp.MinimalExample.WinForms/Program.cs

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,12 @@ public static int Main(string[] args)
1717
//For Windows 7 and above, best to include relevant app.manifest entries as well
1818
Cef.EnableHighDPISupport();
1919

20-
#if NETCOREAPP
21-
//We are using our current exe as the BrowserSubProcess
22-
//Multiple instances will be spawned to handle all the
23-
//Chromium proceses, render, gpu, network, plugin, etc.
24-
var subProcessExe = new CefSharp.BrowserSubprocess.BrowserSubprocessExecutable();
25-
var result = subProcessExe.Main(args);
26-
if (result > 0)
27-
{
28-
return result;
29-
}
30-
#endif
31-
3220
var settings = new CefSettings()
3321
{
3422
//By default CefSharp will use an in-memory cache, you need to specify a Cache Folder to persist data
3523
CachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "CefSharp\\Cache")
3624
};
3725

38-
#if NETCOREAPP
39-
//We use our Applications exe as the BrowserSubProcess, multiple copies
40-
//will be spawned
41-
var exePath = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
42-
settings.BrowserSubprocessPath = exePath;
43-
#endif
44-
4526
//Example of setting a command line argument
4627
//Enables WebRTC
4728
// - CEF Doesn't currently support permissions on a per browser basis see https://bitbucket.org/chromiumembedded/cef/issues/2582/allow-run-time-handling-of-media-access
@@ -54,9 +35,15 @@ public static int Main(string[] args)
5435
//For screen sharing add (see https://bitbucket.org/chromiumembedded/cef/issues/2582/allow-run-time-handling-of-media-access#comment-58677180)
5536
settings.CefCommandLineArgs.Add("enable-usermedia-screen-capturing");
5637

38+
var dependencyCheck = true;
39+
40+
#if NETCOREAPP
41+
//This should be fixed shortly.
42+
dependencyCheck = false;
43+
#endif
5744

5845
//Perform dependency check to make sure all relevant resources are in our output directory.
59-
Cef.Initialize(settings, performDependencyCheck: true, browserProcessHandler: null);
46+
Cef.Initialize(settings, performDependencyCheck: dependencyCheck, browserProcessHandler: null);
6047

6148
var browser = new BrowserForm();
6249
Application.Run(browser);
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="cef.redist.x64" version="86.0.24" targetFramework="net452" />
4-
<package id="cef.redist.x86" version="86.0.24" targetFramework="net452" />
5-
<package id="CefSharp.Common" version="86.0.241" targetFramework="net452" />
6-
<package id="CefSharp.WinForms" version="86.0.241" targetFramework="net452" />
3+
<package id="cef.redist.x64" version="87.1.13" targetFramework="net452" />
4+
<package id="cef.redist.x86" version="87.1.13" targetFramework="net452" />
5+
<package id="CefSharp.Common" version="87.1.132" targetFramework="net452" />
6+
<package id="CefSharp.WinForms" version="87.1.132" targetFramework="net452" />
77
</packages>

0 commit comments

Comments
 (0)