diff --git a/CefSharp.MinimalExample.OffScreen/CefSharp.MinimalExample.OffScreen.csproj b/CefSharp.MinimalExample.OffScreen/CefSharp.MinimalExample.OffScreen.csproj
index f9be5d3..c3d3247 100644
--- a/CefSharp.MinimalExample.OffScreen/CefSharp.MinimalExample.OffScreen.csproj
+++ b/CefSharp.MinimalExample.OffScreen/CefSharp.MinimalExample.OffScreen.csproj
@@ -1,8 +1,8 @@
-
-
-
+
+
+
Debug
@@ -87,16 +87,16 @@
app.manifest
-
- ..\packages\CefSharp.Common.87.1.132\lib\net452\CefSharp.dll
+
+ ..\packages\CefSharp.Common.88.2.90\lib\net452\CefSharp.dll
True
-
- ..\packages\CefSharp.Common.87.1.132\lib\net452\CefSharp.Core.dll
+
+ ..\packages\CefSharp.Common.88.2.90\lib\net452\CefSharp.Core.dll
True
-
- ..\packages\CefSharp.OffScreen.87.1.132\lib\net452\CefSharp.OffScreen.dll
+
+ ..\packages\CefSharp.OffScreen.88.2.90\lib\net452\CefSharp.OffScreen.dll
True
@@ -117,8 +117,8 @@
-
-
+
+
\ No newline at end of file
diff --git a/CefSharp.MinimalExample.OffScreen/CefSharp.MinimalExample.OffScreen.netcore.csproj b/CefSharp.MinimalExample.OffScreen/CefSharp.MinimalExample.OffScreen.netcore.csproj
index c61c807..f807d12 100644
--- a/CefSharp.MinimalExample.OffScreen/CefSharp.MinimalExample.OffScreen.netcore.csproj
+++ b/CefSharp.MinimalExample.OffScreen/CefSharp.MinimalExample.OffScreen.netcore.csproj
@@ -7,15 +7,30 @@
bin.netcore\
-
+
Exe
- netcoreapp3.1
+ netcoreapp3.1;net5.0-windows
CefSharp.MinimalExample.OffScreen
app.manifest
false
- x86;x64
+ x86;x64;AnyCPU
+
+ Major
+
+
+
+ win-x86
+ false
+
+
+
+ win-x64
+ false
@@ -26,10 +41,14 @@
+
+
+
+
-
+
-
+
diff --git a/CefSharp.MinimalExample.OffScreen/Program.cs b/CefSharp.MinimalExample.OffScreen/Program.cs
index c165be2..79d3e25 100644
--- a/CefSharp.MinimalExample.OffScreen/Program.cs
+++ b/CefSharp.MinimalExample.OffScreen/Program.cs
@@ -36,8 +36,8 @@ namespace CefSharp.MinimalExample.OffScreen
var dependencyCheck = true;
-#if NETCOREAPP
- //This should be fixed shortly.
+#if NETCOREAPP || ANYCPU
+ //For .Net Core/.Net 5 this should be fixed as part of https://github.com/cefsharp/CefSharp/issues/3388
dependencyCheck = false;
#endif
diff --git a/CefSharp.MinimalExample.OffScreen/packages.config b/CefSharp.MinimalExample.OffScreen/packages.config
index bad575c..be62928 100644
--- a/CefSharp.MinimalExample.OffScreen/packages.config
+++ b/CefSharp.MinimalExample.OffScreen/packages.config
@@ -1,7 +1,7 @@
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/CefSharp.MinimalExample.WinForms/CefSharp.MinimalExample.WinForms.csproj b/CefSharp.MinimalExample.WinForms/CefSharp.MinimalExample.WinForms.csproj
index a038c70..c35f97c 100644
--- a/CefSharp.MinimalExample.WinForms/CefSharp.MinimalExample.WinForms.csproj
+++ b/CefSharp.MinimalExample.WinForms/CefSharp.MinimalExample.WinForms.csproj
@@ -1,8 +1,8 @@
-
-
-
+
+
+
Debug
AnyCPU
@@ -72,16 +72,16 @@
app.manifest
-
- ..\packages\CefSharp.Common.87.1.132\lib\net452\CefSharp.dll
+
+ ..\packages\CefSharp.Common.88.2.90\lib\net452\CefSharp.dll
True
-
- ..\packages\CefSharp.Common.87.1.132\lib\net452\CefSharp.Core.dll
+
+ ..\packages\CefSharp.Common.88.2.90\lib\net452\CefSharp.Core.dll
True
-
- ..\packages\CefSharp.WinForms.87.1.132\lib\net452\CefSharp.WinForms.dll
+
+ ..\packages\CefSharp.WinForms.88.2.90\lib\net452\CefSharp.WinForms.dll
True
@@ -141,8 +141,8 @@
-
-
+
+
\ No newline at end of file
diff --git a/CefSharp.MinimalExample.WinForms/CefSharp.MinimalExample.WinForms.net472.csproj b/CefSharp.MinimalExample.WinForms/CefSharp.MinimalExample.WinForms.net472.csproj
index fa6cb0c..c92bba9 100644
--- a/CefSharp.MinimalExample.WinForms/CefSharp.MinimalExample.WinForms.net472.csproj
+++ b/CefSharp.MinimalExample.WinForms/CefSharp.MinimalExample.WinForms.net472.csproj
@@ -17,7 +17,8 @@
app.manifest
false
x86;x64
- {1D1D63D1-5257-4AA0-A284-7EF4574878CB}
+ {1D1D63D1-5257-4AA0-A284-7EF4574878CB}
+ CefSharp.MinimalExample.WinForms.Program
@@ -30,11 +31,11 @@
-
+
-
+
diff --git a/CefSharp.MinimalExample.WinForms/CefSharp.MinimalExample.WinForms.netcore.csproj b/CefSharp.MinimalExample.WinForms/CefSharp.MinimalExample.WinForms.netcore.csproj
index c23404b..98ec41c 100644
--- a/CefSharp.MinimalExample.WinForms/CefSharp.MinimalExample.WinForms.netcore.csproj
+++ b/CefSharp.MinimalExample.WinForms/CefSharp.MinimalExample.WinForms.netcore.csproj
@@ -11,12 +11,41 @@
WinExe
- netcoreapp3.1
+ netcoreapp3.1;net5.0-windows
true
CefSharp.MinimalExample.WinForms
app.manifest
false
- x86;x64
+ x86;x64;AnyCPU
+
+ Major
+ CefSharp.MinimalExample.WinForms.Program
+
+
+
+
+
+ true
+
+ true
+ CefSharp.MinimalExample.WinForms.ProgramPublishSingleFile
+
+
+
+ win-x86
+ false
+
+
+
+ win-x64
+ false
@@ -29,8 +58,26 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CefSharp.MinimalExample.WinForms/Program.PublishSingleFile.cs b/CefSharp.MinimalExample.WinForms/Program.PublishSingleFile.cs
new file mode 100644
index 0000000..127dd55
--- /dev/null
+++ b/CefSharp.MinimalExample.WinForms/Program.PublishSingleFile.cs
@@ -0,0 +1,60 @@
+// Copyright © 2021 The CefSharp Authors. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
+
+using CefSharp.WinForms;
+using System;
+using System.IO;
+using System.Windows.Forms;
+
+namespace CefSharp.MinimalExample.WinForms
+{
+ ///
+ /// For .Net 5.0 Publishing Single File exe requires using your own applications executable to
+ /// act as the BrowserSubProcess. See https://github.com/cefsharp/CefSharp/issues/3407
+ /// for further details. for the default main application entry point
+ ///
+ public class ProgramPublishSingleFile
+ {
+ [STAThread]
+ public static int Main(string[] args)
+ {
+ //To support High DPI this must be before CefSharp.BrowserSubprocess.SelfHost.Main so the BrowserSubprocess is DPI Aware
+ Cef.EnableHighDPISupport();
+
+ var exitCode = CefSharp.BrowserSubprocess.SelfHost.Main(args);
+
+ if (exitCode >= 0)
+ {
+ return exitCode;
+ }
+
+ var settings = new CefSettings()
+ {
+ //By default CefSharp will use an in-memory cache, you need to specify a Cache Folder to persist data
+ CachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "CefSharp\\Cache"),
+ BrowserSubprocessPath = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName
+ };
+
+ //Example of setting a command line argument
+ //Enables WebRTC
+ // - 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
+ // - CEF Doesn't currently support displaying a UI for media access permissions
+ //
+ //NOTE: WebRTC Device Id's aren't persisted as they are in Chrome see https://bitbucket.org/chromiumembedded/cef/issues/2064/persist-webrtc-deviceids-across-restart
+ settings.CefCommandLineArgs.Add("enable-media-stream");
+ //https://peter.sh/experiments/chromium-command-line-switches/#use-fake-ui-for-media-stream
+ settings.CefCommandLineArgs.Add("use-fake-ui-for-media-stream");
+ //For screen sharing add (see https://bitbucket.org/chromiumembedded/cef/issues/2582/allow-run-time-handling-of-media-access#comment-58677180)
+ settings.CefCommandLineArgs.Add("enable-usermedia-screen-capturing");
+
+ //Don't perform a dependency check
+ Cef.Initialize(settings, performDependencyCheck: false);
+
+ var browser = new BrowserForm();
+ Application.Run(browser);
+
+ return 0;
+ }
+ }
+}
diff --git a/CefSharp.MinimalExample.WinForms/Program.cs b/CefSharp.MinimalExample.WinForms/Program.cs
index c949b53..560ee5b 100644
--- a/CefSharp.MinimalExample.WinForms/Program.cs
+++ b/CefSharp.MinimalExample.WinForms/Program.cs
@@ -43,8 +43,8 @@ namespace CefSharp.MinimalExample.WinForms
var dependencyCheck = true;
-#if NETCOREAPP
- //This should be fixed shortly.
+#if NETCOREAPP || ANYCPU
+ //For .Net Core/.Net 5 this should be fixed as part of https://github.com/cefsharp/CefSharp/issues/3388
dependencyCheck = false;
#endif
diff --git a/CefSharp.MinimalExample.WinForms/packages.config b/CefSharp.MinimalExample.WinForms/packages.config
index b074a73..6f52e8c 100644
--- a/CefSharp.MinimalExample.WinForms/packages.config
+++ b/CefSharp.MinimalExample.WinForms/packages.config
@@ -1,7 +1,7 @@
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/CefSharp.MinimalExample.Wpf/App.xaml.cs b/CefSharp.MinimalExample.Wpf/App.xaml.cs
index 6436121..24ea986 100644
--- a/CefSharp.MinimalExample.Wpf/App.xaml.cs
+++ b/CefSharp.MinimalExample.Wpf/App.xaml.cs
@@ -33,13 +33,19 @@ namespace CefSharp.MinimalExample.Wpf
var dependencyCheck = true;
-#if NETCOREAPP
- //This should be fixed shortly.
+#if NETCOREAPP || ANYCPU
+ //For .Net Core/.Net 5 this should be fixed as part of https://github.com/cefsharp/CefSharp/issues/3388
dependencyCheck = false;
#endif
- //Perform dependency check to make sure all relevant resources are in our output directory.
- Cef.Initialize(settings, performDependencyCheck: dependencyCheck, browserProcessHandler: null);
+ //Example of checking if a call to Cef.Initialize has already been made, we require this for
+ //our .Net 5.0 Single File Publish example, you don't typically need to perform this check
+ //if you call Cef.Initialze within your WPF App constructor.
+ if (!Cef.IsInitialized)
+ {
+ //Perform dependency check to make sure all relevant resources are in our output directory.
+ Cef.Initialize(settings, performDependencyCheck: dependencyCheck, browserProcessHandler: null);
+ }
}
#if ANYCPU
diff --git a/CefSharp.MinimalExample.Wpf/CefSharp.MinimalExample.Wpf.csproj b/CefSharp.MinimalExample.Wpf/CefSharp.MinimalExample.Wpf.csproj
index 4bd4683..1544d1a 100644
--- a/CefSharp.MinimalExample.Wpf/CefSharp.MinimalExample.Wpf.csproj
+++ b/CefSharp.MinimalExample.Wpf/CefSharp.MinimalExample.Wpf.csproj
@@ -1,8 +1,8 @@
-
-
-
+
+
+
Debug
@@ -93,16 +93,16 @@
app.manifest
-
- ..\packages\CefSharp.Common.87.1.132\lib\net452\CefSharp.dll
+
+ ..\packages\CefSharp.Common.88.2.90\lib\net452\CefSharp.dll
True
-
- ..\packages\CefSharp.Common.87.1.132\lib\net452\CefSharp.Core.dll
+
+ ..\packages\CefSharp.Common.88.2.90\lib\net452\CefSharp.Core.dll
True
-
- ..\packages\CefSharp.Wpf.87.1.132\lib\net452\CefSharp.Wpf.dll
+
+ ..\packages\CefSharp.Wpf.88.2.90\lib\net452\CefSharp.Wpf.dll
True
@@ -178,8 +178,8 @@
-
-
+
+
\ No newline at end of file
diff --git a/CefSharp.MinimalExample.Wpf/CefSharp.MinimalExample.Wpf.netcore.csproj b/CefSharp.MinimalExample.Wpf/CefSharp.MinimalExample.Wpf.netcore.csproj
index bbca775..344fe39 100644
--- a/CefSharp.MinimalExample.Wpf/CefSharp.MinimalExample.Wpf.netcore.csproj
+++ b/CefSharp.MinimalExample.Wpf/CefSharp.MinimalExample.Wpf.netcore.csproj
@@ -11,13 +11,42 @@
WinExe
- netcoreapp3.1
+ netcoreapp3.1;net5.0-windows
true
CefSharp.MinimalExample.Wpf
chromium-256.ico
app.manifest
false
- x86;x64
+ x86;x64;AnyCPU
+
+ Major
+ CefSharp.MinimalExample.Wpf.App
+
+
+
+ win-x86
+ false
+
+
+
+ win-x64
+ false
+
+
+
+
+
+ true
+
+ true
+ CefSharp.MinimalExample.Wpf.ProgramPublishSingleFile
@@ -30,9 +59,13 @@
+
+
+
+
-
+
diff --git a/CefSharp.MinimalExample.Wpf/MainWindow.xaml b/CefSharp.MinimalExample.Wpf/MainWindow.xaml
index b61cad0..c179bd2 100644
--- a/CefSharp.MinimalExample.Wpf/MainWindow.xaml
+++ b/CefSharp.MinimalExample.Wpf/MainWindow.xaml
@@ -41,7 +41,7 @@
+ Address="https://www.google.com">
diff --git a/CefSharp.MinimalExample.Wpf/Program.PublishSingleFile.cs b/CefSharp.MinimalExample.Wpf/Program.PublishSingleFile.cs
new file mode 100644
index 0000000..9be292c
--- /dev/null
+++ b/CefSharp.MinimalExample.Wpf/Program.PublishSingleFile.cs
@@ -0,0 +1,62 @@
+// Copyright © 2021 The CefSharp Authors. All rights reserved.
+//
+// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
+
+using CefSharp.Wpf;
+using System;
+using System.IO;
+
+namespace CefSharp.MinimalExample.Wpf
+{
+ ///
+ /// For .Net 5.0 Publishing Single File exe requires using your own applications executable to
+ /// act as the BrowserSubProcess. See https://github.com/cefsharp/CefSharp/issues/3407
+ /// for further details. for the default main application entry point
+ ///
+ public class ProgramPublishSingleFile
+ {
+ [STAThread]
+ public static int Main(string[] args)
+ {
+ //To support High DPI this must be before CefSharp.BrowserSubprocess.SelfHost.Main so the BrowserSubprocess is DPI Aware
+ Cef.EnableHighDPISupport();
+
+ var exitCode = CefSharp.BrowserSubprocess.SelfHost.Main(args);
+
+ if (exitCode >= 0)
+ {
+ return exitCode;
+ }
+
+ var settings = new CefSettings()
+ {
+ //By default CefSharp will use an in-memory cache, you need to specify a Cache Folder to persist data
+ CachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "CefSharp\\Cache"),
+ BrowserSubprocessPath = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName
+ };
+
+ //Example of setting a command line argument
+ //Enables WebRTC
+ // - 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
+ // - CEF Doesn't currently support displaying a UI for media access permissions
+ //
+ //NOTE: WebRTC Device Id's aren't persisted as they are in Chrome see https://bitbucket.org/chromiumembedded/cef/issues/2064/persist-webrtc-deviceids-across-restart
+ settings.CefCommandLineArgs.Add("enable-media-stream");
+ //https://peter.sh/experiments/chromium-command-line-switches/#use-fake-ui-for-media-stream
+ settings.CefCommandLineArgs.Add("use-fake-ui-for-media-stream");
+ //For screen sharing add (see https://bitbucket.org/chromiumembedded/cef/issues/2582/allow-run-time-handling-of-media-access#comment-58677180)
+ settings.CefCommandLineArgs.Add("enable-usermedia-screen-capturing");
+
+ //Don't perform a dependency check
+ //By default this example calls Cef.Initialzie in the CefSharp.MinimalExample.Wpf.App
+ //constructor for purposes of providing a self contained single file example we call it here.
+ //You could remove this code and use the CefSharp.MinimalExample.Wpf.App example if you
+ //set BrowserSubprocessPath to an absolute path to your main application exe.
+ Cef.Initialize(settings, performDependencyCheck: false);
+
+ var app = new App();
+ app.InitializeComponent();
+ return app.Run();
+ }
+ }
+}
diff --git a/CefSharp.MinimalExample.Wpf/packages.config b/CefSharp.MinimalExample.Wpf/packages.config
index a188ccd..2600ad9 100644
--- a/CefSharp.MinimalExample.Wpf/packages.config
+++ b/CefSharp.MinimalExample.Wpf/packages.config
@@ -1,8 +1,8 @@
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/CefSharp.MinimalExample.netcore.sln b/CefSharp.MinimalExample.netcore.sln
index 7a2a731..6898e0a 100644
--- a/CefSharp.MinimalExample.netcore.sln
+++ b/CefSharp.MinimalExample.netcore.sln
@@ -11,32 +11,46 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CefSharp.MinimalExample.Off
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {4E27910D-3B6C-41C1-84B4-A05C58EE8AE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4E27910D-3B6C-41C1-84B4-A05C58EE8AE8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4E27910D-3B6C-41C1-84B4-A05C58EE8AE8}.Debug|x64.ActiveCfg = Debug|x64
{4E27910D-3B6C-41C1-84B4-A05C58EE8AE8}.Debug|x64.Build.0 = Debug|x64
{4E27910D-3B6C-41C1-84B4-A05C58EE8AE8}.Debug|x86.ActiveCfg = Debug|x86
{4E27910D-3B6C-41C1-84B4-A05C58EE8AE8}.Debug|x86.Build.0 = Debug|x86
+ {4E27910D-3B6C-41C1-84B4-A05C58EE8AE8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4E27910D-3B6C-41C1-84B4-A05C58EE8AE8}.Release|Any CPU.Build.0 = Release|Any CPU
{4E27910D-3B6C-41C1-84B4-A05C58EE8AE8}.Release|x64.ActiveCfg = Release|x64
{4E27910D-3B6C-41C1-84B4-A05C58EE8AE8}.Release|x64.Build.0 = Release|x64
{4E27910D-3B6C-41C1-84B4-A05C58EE8AE8}.Release|x86.ActiveCfg = Release|x86
{4E27910D-3B6C-41C1-84B4-A05C58EE8AE8}.Release|x86.Build.0 = Release|x86
+ {83E2C9C4-2967-4A49-8B2A-D31D33DCFB03}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {83E2C9C4-2967-4A49-8B2A-D31D33DCFB03}.Debug|Any CPU.Build.0 = Debug|Any CPU
{83E2C9C4-2967-4A49-8B2A-D31D33DCFB03}.Debug|x64.ActiveCfg = Debug|x64
{83E2C9C4-2967-4A49-8B2A-D31D33DCFB03}.Debug|x64.Build.0 = Debug|x64
{83E2C9C4-2967-4A49-8B2A-D31D33DCFB03}.Debug|x86.ActiveCfg = Debug|x86
{83E2C9C4-2967-4A49-8B2A-D31D33DCFB03}.Debug|x86.Build.0 = Debug|x86
+ {83E2C9C4-2967-4A49-8B2A-D31D33DCFB03}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {83E2C9C4-2967-4A49-8B2A-D31D33DCFB03}.Release|Any CPU.Build.0 = Release|Any CPU
{83E2C9C4-2967-4A49-8B2A-D31D33DCFB03}.Release|x64.ActiveCfg = Release|x64
{83E2C9C4-2967-4A49-8B2A-D31D33DCFB03}.Release|x64.Build.0 = Release|x64
{83E2C9C4-2967-4A49-8B2A-D31D33DCFB03}.Release|x86.ActiveCfg = Release|x86
{83E2C9C4-2967-4A49-8B2A-D31D33DCFB03}.Release|x86.Build.0 = Release|x86
+ {AB1B7B81-D472-43B2-AFE3-DE5D1B22B9CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AB1B7B81-D472-43B2-AFE3-DE5D1B22B9CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AB1B7B81-D472-43B2-AFE3-DE5D1B22B9CE}.Debug|x64.ActiveCfg = Debug|x64
{AB1B7B81-D472-43B2-AFE3-DE5D1B22B9CE}.Debug|x64.Build.0 = Debug|x64
{AB1B7B81-D472-43B2-AFE3-DE5D1B22B9CE}.Debug|x86.ActiveCfg = Debug|x86
{AB1B7B81-D472-43B2-AFE3-DE5D1B22B9CE}.Debug|x86.Build.0 = Debug|x86
+ {AB1B7B81-D472-43B2-AFE3-DE5D1B22B9CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AB1B7B81-D472-43B2-AFE3-DE5D1B22B9CE}.Release|Any CPU.Build.0 = Release|Any CPU
{AB1B7B81-D472-43B2-AFE3-DE5D1B22B9CE}.Release|x64.ActiveCfg = Release|x64
{AB1B7B81-D472-43B2-AFE3-DE5D1B22B9CE}.Release|x64.Build.0 = Release|x64
{AB1B7B81-D472-43B2-AFE3-DE5D1B22B9CE}.Release|x86.ActiveCfg = Release|x86
diff --git a/UpdateNugetPackages.bat b/UpdateNugetPackages.bat
index e7133c2..1749b62 100644
--- a/UpdateNugetPackages.bat
+++ b/UpdateNugetPackages.bat
@@ -1,4 +1,4 @@
-SET cefsharpversion=87.1.132
+SET cefsharpversion=88.2.90
..\nuget restore CefSharp.MinimalExample.sln