Modify nuget package version before build

pdoyle's Avatar

pdoyle

08 Nov, 2019 02:27 PM

We are using Selenium and Chromedriver for unit testing and locally have the latest Chrome installed, currently 78, but the appveyor build images only support up to 77. I am trying to find a way to have the Selenium.WebDriver.ChromeDriver nuget package downgraded before the build process so that we don't have to worry about the package versions locally.

Microsoft has the Update-Package powershell cmdlet but its only available from the nuget console. Is there a way to run nuget console commands in the build process? Or another way to accomplish what I am trying to do? Preferably without doing like a manual string replace on the packages.config and .csproj.

  1. Support Staff 1 Posted by Feodor Fitsner on 08 Nov, 2019 10:18 PM

    Feodor Fitsner's Avatar

    Sure, you can use nuget command line client which is pre-installed on build VMs. Also, you can upgrade Chrome to the latest version with Chocolatey: choco install googlechrome.

    Btw, we've just deployed updated build VM images with the latest Chrome 78 installed.

  2. 2 Posted by pdoyle on 12 Nov, 2019 02:33 PM

    pdoyle's Avatar

    Thanks!

    Where can those commands be run from? The "before build script" as Cmd or?

  3. Support Staff 3 Posted by Feodor Fitsner on 12 Nov, 2019 07:22 PM

    Feodor Fitsner's Avatar

    Yep...and as I previously noted we've updated build images with the latest Chrome.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac