Nunit-console-runner version

Jan Philipp Lührig's Avatar

Jan Philipp Lührig

23 Mar, 2020 03:54 PM

Hello,

Where and how can we upgrade the nunit-console-runner. We have a problem with the console runner and use locally the 3.10 which works fine. The 3.6 does not work. How can we upgrade it?

Regards Jan P. Lührig

  1. Support Staff 1 Posted by Feodor Fitsner on 23 Mar, 2020 05:33 PM

    Feodor Fitsner's Avatar

    Hi Jan Philipp,

    You can update NUnit 3 runner to the latest 3.11.1 version with the following PowerShell script:

    # nunit
    $nunitPath = "$env:SYSTEMDRIVE\Tools\NUnit3"
    Remove-Item $nunitPath -Recurse -Force
    $zipPath = "$env:TEMP\NUnit.Console-3.11.1.zip"
    (New-Object Net.WebClient).DownloadFile('https://github.com/nunit/nunit-console/releases/download/v3.11.1/NUnit.Console-3.11.1.zip', $zipPath)
    7z x $zipPath -y -o"$nunitPath" | Out-Null
    
    # logger
    $zipPath = "$env:TEMP\Appveyor.NUnit3Logger.zip"
    (New-Object Net.WebClient).DownloadFile('https://www.appveyor.com/downloads/Appveyor.NUnit3Logger.zip', $zipPath)
    7z x $zipPath -y -o"$nunitPath\addins" | Out-Null
    Move-Item "$nunitPath\addins\appveyor.addins" "$nunitPath\appveyor.addins"
    
  2. Support Staff 2 Posted by Feodor Fitsner on 23 Mar, 2020 05:34 PM

    Feodor Fitsner's Avatar

    Created a new issue to update the images: https://github.com/appveyor/ci/issues/3360

  3. 3 Posted by Jan Philipp Lüh... on 24 Mar, 2020 09:22 AM

    Jan Philipp Lührig's Avatar

    I’m sorry for this question, but where I execute this script? Before every build?

    I used it in the init script as ps, but nothing changes / happens.

    Regards JP Lührig

    Von: Feodor Fitsner <[email blocked]>
    Gesendet: Montag, 23. März 2020 18:34
    An: Jan Philipp Lührig <[email blocked]>
    Betreff: [EXTERNAL] Re: Nunit-console-runner version [Questions #47366]

  4. Support Staff 4 Posted by Feodor Fitsner on 24 Mar, 2020 07:29 PM

    Feodor Fitsner's Avatar

    If you are using appveyor.yml then you should put that script into appveyor.yml as UI settings will be ignored:

    init:
    - ps: |
       # nunit
       $nunitPath = "$env:SYSTEMDRIVE\Tools\NUnit3"
       Remove-Item $nunitPath -Recurse -Force
       $zipPath = "$env:TEMP\NUnit.Console-3.11.1.zip"
       (New-Object Net.WebClient).DownloadFile('https://github.com/nunit/nunit-console/releases/download/v3.11.1/NUnit.Console-3.11.1.zip', $zipPath)
       7z x $zipPath -y -o"$nunitPath" | Out-Null
       # logger
       $zipPath = "$env:TEMP\Appveyor.NUnit3Logger.zip"
       (New-Object Net.WebClient).DownloadFile('https://www.appveyor.com/downloads/Appveyor.NUnit3Logger.zip', $zipPath)
       7z x $zipPath -y -o"$nunitPath\addins" | Out-Null
        Move-Item "$nunitPath\addins\appveyor.addins" "$nunitPath\appveyor.addins"
    
  5. 5 Posted by Jan Philipp Lüh... on 24 Mar, 2020 09:43 PM

    Jan Philipp Lührig's Avatar

    I’ve done this, but then there is following error
    '"nunit3-console"' is not recognized as an internal or external command,

    Best regards Jan P. Lührig

    Von: Feodor Fitsner <[email blocked]>
    Gesendet: Dienstag, 24. März 2020 20:29
    An: Jan Philipp Lührig <[email blocked]>
    Betreff: [EXTERNAL] Re: Nunit-console-runner version [Questions #47366]

  6. Support Staff 6 Posted by Feodor Fitsner on 24 Mar, 2020 09:51 PM

    Feodor Fitsner's Avatar

    Oh, I see. For newer versions of NUnit there are multiple distros included in the zip. OK, this script should work:

    init:
    - ps: |
       # nunit
       $nunitPath = "$env:SYSTEMDRIVE\Tools\NUnit3"
       Remove-Item $nunitPath -Recurse -Force
       $zipPath = "$env:TEMP\NUnit.Console-3.11.1.zip"
       $tempPath = "$env:TEMP\NUnit.Console"
       (New-Object Net.WebClient).DownloadFile('https://github.com/nunit/nunit-console/releases/download/v3.11.1/NUnit.Console-3.11.1.zip', $zipPath)
       7z x $zipPath -y -o"$tempPath" | Out-Null
       [IO.Directory]::Move("$tempPath\bin\net35", $nunitPath)
       # logger
       $zipPath = "$env:TEMP\Appveyor.NUnit3Logger.zip"
       (New-Object Net.WebClient).DownloadFile('https://www.appveyor.com/downloads/Appveyor.NUnit3Logger.zip', $zipPath)
       7z x $zipPath -y -o"$nunitPath\addins" | Out-Null
        Move-Item "$nunitPath\addins\appveyor.addins" "$nunitPath\appveyor.addins"
    

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