DotNetBrowser 2.21.0
Prefix ReservedSee the version list below for details.
dotnet add package DotNetBrowser --version 2.21.0
NuGet\Install-Package DotNetBrowser -Version 2.21.0
<PackageReference Include="DotNetBrowser" Version="2.21.0" />
paket add DotNetBrowser --version 2.21.0
#r "nuget: DotNetBrowser, 2.21.0"
// Install DotNetBrowser as a Cake Addin #addin nuget:?package=DotNetBrowser&version=2.21.0 // Install DotNetBrowser as a Cake Tool #tool nuget:?package=DotNetBrowser&version=2.21.0
DotNetBrowser
Integrate a Chromium-based browser into your .NET application to load and process modern web pages built with HTML5, CSS3, JavaScript etc.
To be able to use DotNetBrowser, you should obtain a license. A free 30-day evaluation license can be requested by filling a form at https://www.teamdev.com/dotnetbrowser#evaluate
Deep Chromium integration
DotNetBrowser provides API that can be used to interact with a huge set of various Chromium features directly from the code:
- DOM API: you can access Document Object Model of the loaded web page, find elements and interact with them, handle and dispatch DOM events for the particular nodes.
- JS-.NET bridge: you can execute JavaScript on the web page and process the results. You can also inject any .NET object into the web page and then use it in your JavaScript code.
- Printing API: you can initiate and configure printing programmatically. Printing to PDF is also supported out of box.
- Network API: you can intercept, redirect, handle, and suppress network requests, override HTTP headers and POST data, filter out incoming and outgoing cookies, change proxy settings on the fly.
See the examples to understand what can be implemented with DotNetBrowser.
Easy deployment
All required Chromium binaries are deployed as DotNetBrowser DLLs and can be extracted automatically during execution. You don't need to pre-install Chromium, Google Chrome, or a Chromium-based runtime to work with DotNetBrowser.
The current release of DotNetBrowser uses Chromium build 110.0.5481.77.
Headless mode
DotNetBrowser can be used in Windows services and server apps. The web page can be loaded and rendered completely in memory without displaying any visible windows. You can then take a screenshot of the loaded web page.
User input simulation
DotNetBrowser provides means to simulate mouse and keyboard input and interact with the web page programmatically - exactly as regular users do.
UI
DotNetBrowser provides UI controls for WPF and Windows Forms applications. These controls can be used to display web pages as integral parts of the .NET applications. It is also possible to use DotNetBrowser to create VSTO add-ins.
Usage
Note: The VB.NET examples can be found in the examples repository.
WPF
XAML
<Window x:Class="Sample.Wpf.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:wpf="clr-namespace:DotNetBrowser.Wpf;assembly=DotNetBrowser.Wpf"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800" Closed="MainWindow_OnClosed">
<Grid>
<wpf:BrowserView x:Name="browserView"/>
</Grid>
</Window>
Code
using System;
using System.Windows
using DotNetBrowser.Browser;
using DotNetBrowser.Engine;
namespace Sample.Wpf {
public partial class MainWindow : Window {
private readonly IEngine engine;
private readonly IBrowser browser;
public MainWindow() {
InitializeComponent();
// Create and initialize the IEngine
engine = EngineFactory.Create();
// Create the IBrowser
browser = engine.CreateBrowser();
browser.Navigation.LoadUrl("https://teamdev.com/dotnetbrowser");
// Initialize the WPF BrowserView control
browserView.InitializeFrom(browser);
}
private void MainWindow_OnClosed(object sender, EventArgs e) {
browser.Dispose();
engine.Dispose();
}
}
}
Windows Forms
using System;
using System.Windows.Forms;
using DotNetBrowser.Browser;
using DotNetBrowser.Engine;
using DotNetBrowser.WinForms;
namespace Sample.WinForms {
public partial class Form1 : Form {
private readonly IEngine engine;
private readonly IBrowser browser;
public Form1() {
InitializeComponent();
// Create and initialize the IEngine
engine = EngineFactory.Create();
// Create the Windows Forms BrowserView control
BrowserView browserView = new BrowserView() {
Dock = DockStyle.Fill
};
// Create the IBrowser
browser = engine.CreateBrowser();
browser.Navigation.LoadUrl("https://teamdev.com/dotnetbrowser");
// Initialize the Windows Forms BrowserView control
browserView.InitializeFrom(browser);
// Add the BrowserView control to the Form
Controls.Add(browserView);
Closed += Form1Closed;
}
private void Form1Closed(object sender, EventArgs e) {
browser.Dispose();
engine.Dispose();
}
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.5
- DotNetBrowser.Chromium.Win-arm64.Net45 (>= 2.21.0)
- DotNetBrowser.Chromium.Win-x64.Net45 (>= 2.21.0)
- DotNetBrowser.Chromium.Win-x86.Net45 (>= 2.21.0)
- protobuf-net (>= 2.4.0)
-
.NETStandard 2.0
- DotNetBrowser.Chromium.Win-arm64.NetStandard20 (>= 2.21.0)
- DotNetBrowser.Chromium.Win-x64.NetStandard20 (>= 2.21.0)
- DotNetBrowser.Chromium.Win-x86.NetStandard20 (>= 2.21.0)
- protobuf-net (>= 2.4.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on DotNetBrowser:
Package | Downloads |
---|---|
DotNetBrowser.Wpf
A Chromium-based WPF component that can be embedded into your .NET application to display modern web pages built with HTML5, CSS3, JavaScript etc. You can obtain a free 30-day trial by filling a form at https://www.teamdev.com/dotnetbrowser#evaluate |
|
DotNetBrowser.WinForms
A Chromium-based WinForms component that can be embedded into your .NET application to display modern web pages built with HTML5, CSS3, JavaScript etc. You can obtain a free 30-day trial by filling a form at https://www.teamdev.com/dotnetbrowser#evaluate |
|
DotNetBrowser.WinUi3
A Chromium-based WinUI 3 component that can be embedded into your .NET application to display modern web pages built with HTML5, CSS3, JavaScript etc. You can obtain a free 30-day trial by filling a form at https://www.teamdev.com/dotnetbrowser#evaluate |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on DotNetBrowser:
Repository | Stars |
---|---|
Necrobot-Private/NecroBot
NecroBot2
|
Version | Downloads | Last updated |
---|---|---|
3.0.0-eap.2 | 180 | 8/20/2024 |
3.0.0-eap.1 | 143 | 5/22/2024 |
2.27.6 | 136 | 11/12/2024 |
2.27.5 | 841 | 10/2/2024 |
2.27.4 | 500 | 9/13/2024 |
2.27.3 | 1,146 | 8/5/2024 |
2.27.2 | 1,199 | 6/21/2024 |
2.27.1 | 1,246 | 5/30/2024 |
2.27.0 | 428 | 5/22/2024 |
2.26.2 | 3,716 | 4/24/2024 |
2.26.1 | 788 | 3/28/2024 |
2.26.0 | 1,554 | 2/27/2024 |
2.25.1 | 868 | 1/22/2024 |
2.25.0 | 3,969 | 12/27/2023 |
2.24.2 | 1,652 | 11/22/2023 |
2.24.1 | 1,608 | 10/20/2023 |
2.24.0 | 3,318 | 10/3/2023 |
2.23.3 | 1,197 | 9/6/2023 |
2.23.2 | 1,224 | 8/3/2023 |
2.23.1 | 2,834 | 6/22/2023 |
2.23.0 | 4,497 | 5/25/2023 |
2.22.1 | 898 | 4/27/2023 |
2.22.0 | 2,182 | 3/23/2023 |
2.21.0 | 2,486 | 2/27/2023 |
2.20.1 | 2,093 | 2/7/2023 |
2.20.0 | 1,435 | 12/28/2022 |
2.19.0 | 989 | 12/5/2022 |
2.18.0 | 5,714 | 10/21/2022 |
2.17.0 | 1,619 | 10/5/2022 |
2.16.1 | 3,224 | 8/23/2022 |
2.16.0 | 2,204 | 8/8/2022 |
2.15.1 | 2,496 | 6/17/2022 |
2.15.0 | 1,473 | 6/14/2022 |
2.14.0 | 3,580 | 4/29/2022 |
2.13.1 | 3,268 | 4/12/2022 |
2.13.0 | 1,469 | 4/7/2022 |
2.12.0 | 2,853 | 3/23/2022 |
2.11.0 | 9,728 | 1/14/2022 |
2.10.0 | 4,314 | 11/18/2021 |
2.9.0 | 16,300 | 9/24/2021 |
2.8.0 | 2,901 | 8/20/2021 |
2.7.0 | 1,755 | 7/26/2021 |
2.6.0 | 4,005 | 5/27/2021 |
2.5.0 | 4,194 | 4/7/2021 |
2.4.0 | 3,889 | 3/2/2021 |
2.3.0 | 7,820 | 11/26/2020 |
2.2.0 | 4,689 | 9/9/2020 |
2.1.1 | 9,649 | 7/2/2020 |
2.1.0 | 1,524 | 6/18/2020 |
2.0.0 | 6,302 | 2/27/2020 |
We've upgraded Chromium to version 110.0.5481.77.
Use DotNetBrowser on Windows devices with ARM64 architecture.
Subscribe to camera and microphone events to know if they are in use.
Find more in our release notes:
https://dotnetbrowser-support.teamdev.com/release-notes/2023/v2-21.html