问题
I have a WPF application that makes use of Selenium to automate internet explorer instances. The application is deployed to users as a click-once installation.
It makes use of the Selenium.WebDriver.IEDriver nuget package, which provides IEDriverServer.exe
to the bin
directory automatically. This exe is not an entry in the project, but is copied there automatically as part of the build process.
In order for my application to run on computers it is installed on, this exe needs to be included in the click-once deployment. However, it isn't listed in the list of "Application Files" of the "Publish" tab where click-once is configured, even if "Show all files" is checked.
If I manually extract the IEDriverServer.exe
from the package, and add it as content of the project, it is listed, and I can include it, but this breaks the connection to the nuget package. I will have to manually extract and update this file whenever the package is updated. It is also incompatible with automated builds.
How can I get click-once to include the exe from the bin directory without disrupting the "normal" nuget update process, and keeping it compatible with automated builds (TFS build agents)?
来源:https://stackoverflow.com/questions/52819190/deploy-exe-provided-by-nuget-package-as-a-component-of-a-clickonce-installation