CefSharp Example
* Upgrade to v88.2.40-pre WPF - Add https scheme to default URL to workaround upstream issue https://bitbucket.org/chromiumembedded/cef/issues/3079/cant-load-urls-without-scheme * Net Core - Add AnyCPU Platform to projects/solution * Net Core - Add RuntimeIdentifier based on PlatformTarget - Set RuntimeIdentifier based on PlatformTarget (PlatformTarget isn't set of AnyCPU) - Set SelfContained to false so as not to provide a Framework Dependant build (don't include the whole .net framework) * WPF/WinForms - Change CefSharpBuildAction to Content For testing of ClickOnce publish * Net 5.0 - Update to include PublishSingleFile settings - .Net 5.0 Publish Settings for PublishSingleFile https://docs.microsoft.com/en-us/dotnet/core/deploying/single-file Defaults differ compared to .Net Core 3.1 - Set RollForward to Major so runs on newer runtime version - Add net5.0-windows TargetFramework * .Net 5.0 - Publish Single Exe Example - Use the main application exe as the BrowserSubprocess when self publishing a .Net 5.0 exe - Only the WPF and WinForms examples have been updated https://github.com/cefsharp/CefSharp/issues/3407 * Upgrade to 88.2.90 |
||
---|---|---|
CefSharp.MinimalExample.OffScreen | ||
CefSharp.MinimalExample.WinForms | ||
CefSharp.MinimalExample.Wpf | ||
.gitattributes | ||
.gitignore | ||
CefSharp.MinimalExample.net472.sln | ||
CefSharp.MinimalExample.netcore.sln | ||
CefSharp.MinimalExample.sln | ||
LICENSE | ||
NuGet.config | ||
README.md | ||
UpdateNugetPackages.bat |
CefSharp.MinimalExample
Minimal example of how the CefSharp library can be used using the official Nuget
packages
- .NET Framework solution (
CefSharp.MinimalExample.sln
) - .NET Core solution (
CefSharp.MinimalExample.netcore.sln
).
Includes examples for
- WinForms
- WPF
- OffScreen
For a more complete example of each project see the main CefSharp
repository.
.NET Core support
For .Net Core 3.1/Net 5
the following packages are now on Nuget.org
- https://www.nuget.org/packages/CefSharp.WinForms.NETCore
- https://www.nuget.org/packages/CefSharp.Wpf.NETCore
- https://www.nuget.org/packages/CefSharp.OffScreen.NETCore
- Publish Example
- x86: `dotnet publish -f netcoreapp3.1 -r win-x86
- x64: `dotnet publish -f netcoreapp3.1 -r win-x64
It is possible to publish the application as single EXE file by adding -p:PublishSingleFile=true
.
Any problems please report them on https://github.com/cefsharp/CefSharp/issues/3197
.NET 5 Support
The same packages listed above in the .Net Core section should be used for .Net 5.0