简体   繁体   English

Puppeteer Sharp - 未下载 Chromium 修订版

[英]Puppeteer Sharp - Chromium revision is not downloaded

I get the following error when running Puppeteer Sharp code in my console application:在控制台应用程序中运行Puppeteer Sharp代码时出现以下错误:

System.IO.FileNotFoundException: Chromium revision is not downloaded. System.IO.FileNotFoundException:未下载 Chromium 修订版。 Run `BrowserFetcher().DownloadAsync´运行“BrowserFetcher().DownloadAsync”

在此处输入图像描述

Only execute只执行

await new BrowserFetcher().DownloadAsync(BrowserFetcher.DefaultRevision);

as the first statement in your application code.作为应用程序代码中的第一条语句。

This will take some time.这需要一些时间。 After that you can delete this statement and it will work without it.之后,您可以删除此语句,没有它也可以工作。 It downloads Chromium into your local project.它将Chromium下载到您的本地项目中。

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM