gpt4 book ai didi

c# - Selenium.WebDriver.ChromeDriver - chromedriver.exe 未针对 netcore2.2 目标框架发布

转载 作者:太空宇宙 更新时间:2023-11-03 18:52:10 24 4
gpt4 key购买 nike

我安装了 nuget 包 - Selenium.WebDriver.ChromeDriver 2.46.0.. 当我发布(通过 dotnet publish .Net CLI 命令).csproject(目标框架 - netcore2.2)时,chromedriver.exe 没有在输出中复制/publish 文件夹.. 你能请别人帮助我吗?

最佳答案

来自项目所有者github页:

“chromedriver(.exe)”未包含在默认配置的已发布文件中。此行为是设计使然。

如果要在发布的文件中包含“chromedriver(.exe)”,请定义_PUBLISH_CHROMEDRIVER编译符号。

enter image description here

在 MSBuild 文件(.csproj、.vbproj 等)中定义值为“true”的 PublishChromeDriver 属性以发布驱动程序文件。

<Project ...>
...
<PropertyGroup>
...
<PublishChromeDriver>true</PublishChromeDriver>
...
</PropertyGroup>
...
</Project>

注意:MSBuild 属性始终覆盖定义 _PUBLISH_CHROMEDRIVER 编译符号的条件

关于c# - Selenium.WebDriver.ChromeDriver - chromedriver.exe 未针对 netcore2.2 目标框架发布,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55007311/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com