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:

  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


? 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

27 Jan, 2023 08:06 PM
27 Jan, 2023 08:05 PM
25 Jan, 2023 03:23 PM
25 Jan, 2023 03:22 PM
23 Jan, 2023 03:29 PM