How to use PowerShell 5 on Visual Studio 2016 and PowerShell Core 6 on Visual Studio 2019 and Ubuntu?

Florian Feldhaus's Avatar

Florian Feldhaus

02 Jan, 2020 01:35 PM

In the appveyor config file I'd like to use PowerShell 5 in Visual Studio 2016 images and PowerShell Core 6 in Visual Studio 2019 and Ubuntu images for tests. If I use PS, then PowerShell is used on both Visual Studio 2016 and 2019 and PowerShell Core on Ubuntu. How can I change to PowerShell Core on Visual Studio 2019 but keep PowerShell 5 for Visual Studio 2016?

The current appveyor.yml file can be found here:
https://github.com/NetApp-StorageGRID/S3-Client/blob/master/appveyor.yml

  1. Support Staff 1 Posted by Feodor Fitsner on 02 Jan, 2020 10:23 PM

    Feodor Fitsner's Avatar

    Hi Florian,

    I can't suggest an easy hack for that, but you can switch to using powershell and pwsh commands explicitly, kind of:

    - cmd: powershell ./myscript.ps1
    
  2. Feodor Fitsner closed this discussion on 03 Apr, 2020 06:47 PM.

Comments are currently closed for this discussion. You can start a new one.

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

Recent Discussions

09 Jul, 2026 04:35 PM
07 Jul, 2026 07:22 PM
30 Jun, 2026 08:51 PM
26 Jun, 2026 03:33 PM
25 Jun, 2026 12:31 AM

 

05 Jun, 2026 07:28 PM
29 May, 2026 02:17 PM
28 May, 2026 06:46 PM
21 May, 2026 04:32 AM
12 May, 2026 05:50 PM
12 May, 2026 04:16 PM