ac87ce9b5a9aa414fa1c9175fb83834fddff5ba7
- Set CopyToOutputDirectory in csproj files - It's important to make sure the crash_reporter.cfg is copied to the bin folder, it has to be next to your application exe. - Specify AppName in crash_reporter.cfg to have dumps generated to a folder in this case they will be generated at C:\Users\[CurrentUser]\AppData\Local\CefSharp.MinimalExample\User Data - If you are having trouble getting a dump, run your exe outside of Visual Studio, the debugger can sometimes interfere You can test crash reporting as outlined in https://bitbucket.org/chromiumembedded/cef/wiki/CrashReporting.md#markdown-header-testing Loading `chrome://crash` in the browser will crash the render process To confirm that crash reporting is enabled check the debug.log file, you should see a number of entries like Crash reporting enabled for process: browser
CefSharp.MinimalExample
Minimal example of how the CefSharp library can be used using the official Nuget packages with .NET Framework
projects (CefSharp.MinimalExample.sln) and .NET Core projects (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
As of version 75.1.142, the CefSharp NuGet packages can be used with .NET Core 3.0 projects (as shown by the examples). However, the current versions have some limitations that you should be aware of:
- The target machine still needs to have .NET Framework 4.5.2 or higher installed, as the
CefSharp.BrowserSubprocess.exeis still used. - The project file needs to update the references of
CefSharp.WinForms/CefSharp.WPF/CefSharp.OffScreen, as well asCefSharp.CoreandCefSharpto use<Private>true</Private>, as otherwise the CoreCLR would not load these libraries as they would not be specified in the.deps.jsonfile. - When publishing a self-contained app using a runtime identifier
win-x64orwin-x86, you need to set thePlatformproperty tox64orx86; as otherwise it would beAnyCPUand the check in the.targetsfile of the NuGet package would fail.
Example:- x86:
dotnet publish -f netcoreapp3.0 -r win-x86 -p:Platform=x86 - x64:
dotnet publish -f netcoreapp3.0 -r win-x64 -p:Platform=x64
- x86:
It is possible to publish the application as single EXE file by adding -p:PublishSingleFile=true.
Description
Languages
C#
97.3%
Batchfile
2.7%