https://github.com/devlooped/chromium
Run a portable Chromium using dotnet 6+ and nuget.
https://github.com/devlooped/chromium
chromium playwright
Last synced: 25 days ago
JSON representation
Run a portable Chromium using dotnet 6+ and nuget.
- Host: GitHub
- URL: https://github.com/devlooped/chromium
- Owner: devlooped
- License: mit
- Created: 2022-06-02T00:40:02.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2026-05-16T05:13:17.000Z (about 1 month ago)
- Last Synced: 2026-05-16T07:38:19.956Z (about 1 month ago)
- Topics: chromium, playwright
- Language: C#
- Homepage:
- Size: 188 KB
- Stars: 14
- Watchers: 1
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
- License: license.txt
Awesome Lists containing this project
README
 dotnet-chromium
============
[](https://www.nuget.org/packages/dotnet-chromium)
[](https://www.nuget.org/packages/dotnet-chromium)
[](https://github.com/devlooped/chromium/blob/main/license.txt)
[](https://github.com/devlooped/chromium/actions)
Chromium for .NET 8+.
This project allows running a portable embedded version of Chromium from
either a .NET CLI tool or a regular .NET application without having to install
it.
This can help automate a browser as part of your regular app
normal behavior, such as using [Microsoft.Playwright](https://playwright.dev/dotnet/).
## Usage
The project provides two main ways to consume it:
- As a dotnet global tool
- As a regular nuget package library reference.
### dotnet global tool
Install with:
```
dotnet tool install -g dotnet-chromium
```
Run with:
```
chromium [url] [switches]
```
The `url` is optional, and causes the browser to navigate immediately
to that URL on open.
The `switches` are optional, and are passed directly to Chromium. For
example, you'd pass `-headless` to run the browser headless. See the
[list of chromium switches](https://peter.sh/experiments/chromium-command-line-switches/)
for more information.
### nuget package library reference
[](https://www.nuget.org/packages/chromium)
[](https://www.nuget.org/packages/chromium)
```
Install-Package chromium
```
```csharp
if (Chromium.Path != null)
Console.WriteLine($"Found Chromium for current platform at {Chromium.Path}");
else
Console.WriteLine($"Current runtime {System.Runtime.InteropServices.RuntimeInformation.RuntimeIdentifier} is not supported.");
```
This will provide the runtime lookup of the native binaries, but will *not* provide the binaries themselves.
In other words, the `chromium` package is not a **metapackage**. Since NuGet does not provide a built-in
mechanism to conditionally reference specific packages depending on the current runtime platform or library
target's `RuntimeIdentifier(s)`, a metapackage is not practical since it would cause a restore of *all*
platforms, which only bloats download and install size unnecessarily. If you know what platforms your app
will run on, you can reference the relevant ones manually by adding package references to
`chromium.[RID]` as necessary:
[](https://www.nuget.org/packages/chromium.linux-x64)
[](https://www.nuget.org/packages/chromium.win-x64)
[](https://www.nuget.org/packages/chromium.win-x86)
## Releasing
We run a [scheduled workflow](https://github.com/devlooped/chromium/actions/workflows/scheduled.yml) every other week
which creates a new release versioned as `v[YYYY].[M].[D]`, which bundles the snapshots of that day.
It's also possible to create a new release on demand, versioned as `v[YYYY].[M].[D]` and the bundled binaries will be the
snapshots of the day the release build runs.
We fetch binaries from:
* Win-x64: https://download-chromium.appspot.com/dl/Win_x64?type=snapshots
* Win-x86: https://download-chromium.appspot.com/dl/Win?type=snapshots
* Linux-x64: https://download-chromium.appspot.com/dl/Linux_x64?type=snapshots
# Sponsors
[](https://github.com/clarius)
[](https://github.com/MFB-Technologies-Inc)
[](https://github.com/khamza85)
[](https://github.com/sandrock)
[](https://github.com/drivenet)
[](https://github.com/Keflon)
[](https://github.com/tbolon)
[](https://github.com/kfrancis)
[](https://github.com/rbnswartz)
[](https://github.com/jfoshee)
[](https://github.com/Mrxx99)
[](https://github.com/eajhnsn1)
[](https://github.com/Jonathan-Hickey)
[](https://github.com/KenBonny)
[](https://github.com/SimonCropp)
[](https://github.com/agileworks-eu)
[](https://github.com/arsdragonfly)
[](https://github.com/vezel-dev)
[](https://github.com/ChilliCream)
[](https://github.com/4OTC)
[](https://github.com/DominicSchell)
[](https://github.com/adalon)
[](https://github.com/torutek)
[](https://github.com/mccaffers)
[](https://github.com/SeikaLogiciel)
[](https://github.com/wizardness)
[](https://github.com/eska-gmbh)
[](https://github.com/sponsors/devlooped)
[Learn more about GitHub Sponsors](https://github.com/sponsors)