如何查找或选择适配Puppeteer Sharp的Chrome/Chromium修订版本号
Great question! Matching the right Chromium revision with Puppeteer Sharp can feel a bit tedious when doing manual archive hunts, but there are several more reliable and efficient approaches to get the exact version you need. Here are my top recommendations:
Start with Puppeteer Sharp's Official Releases
This is the most foolproof method. Every Puppeteer Sharp version (available on NuGet or GitHub Releases) explicitly states the Chromium revision it’s designed to work with. For example, if you’re using Puppeteer Sharp v120.0.0, the release notes will directly tell you the compatible Chromium revision—no guesswork required. Using this official pairing guarantees you’re running a version the library was thoroughly tested against, avoiding random compatibility bugs.Pull the Exact Revision Directly from Your Local Chrome
Ditch external proxy tools like OmahaProxy and get the revision straight from your installed browser:- On Windows: Open Command Prompt and run
"%ProgramFiles%\Google\Chrome\Application\chrome.exe" --versionto get your Chrome version string, then openchrome://version/in the browser. Look for the Revision field—it gives you the precise Chromium revision your local Chrome is using. - On macOS/Linux: Run
google-chrome --versionin the terminal, then visitchrome://version/to find the revision.
This is far more accurate than guessing from a branch base position, since it’s the actual revision your browser is running.
- On Windows: Open Command Prompt and run
Use Puppeteer Sharp's Built-in BrowserFetcher
Puppeteer Sharp includes aBrowserFetcherclass that automates revision matching and Chromium downloads. You can use it to:- Fetch the revision corresponding to a specific Chrome version with the method:
await BrowserFetcher.GetRevisionInfoAsync("<your-chrome-version>"); - Download the exact compatible Chromium build directly, so you never have to manually sift through build archives again.
This tool takes all the manual work out of the process and ensures you get a build that’s fully compatible with your Puppeteer Sharp version.
- Fetch the revision corresponding to a specific Chrome version with the method:
Use Chromium's Version-to-Revision Mapping
Chromium maintains a direct, official mapping between Chrome version numbers (like120.0.6099.109) and their associated Chromium revisions. You can use this mapping to look up the revision quickly—either through internal Chromium tooling or a simple search for your Chrome version paired with "Chromium revision" to find the exact number.
内容的提问来源于stack exchange,提问作者Kenny Evitt

