For a recent project, I had to use Chromedriver.exe to perform some scraping-tasks with Selenium.
The project runs on an IIS on a hosted server, which means I can use Chromedriver.exe – something that is not possible on Azure WebApp.
Including Chromedriver.exe in your project
Install the NuGet package
When you now build the project, Chromedriver.exe will be copied to the output directory. Great!
Including it in dotnet publish – for CI/CD pipeline
However, to make it work in a CI/CD pipeline on Azure Devops, we need Chromedriver.exe to be copied during
dotnet publish as well.
- Open the .csproj file of the ASP.Net web project, you want to use Chromedriver.exe from
- Find PropertyGroup
- Add a line:
That’s it! It will now be including when publishing, which means Azure Devops will include it in the drop – and the Release pipeline will copy it to your destination with the rest of the website!
Comments are closed.