question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support PowerShell installed as .NET Core Global Tools

See original GitHub issue

My issue related to following newsblog:

https://devblogs.microsoft.com/powershell/introducing-powershell-as-net-global-tool/

I have uninstalled PowerShell 6.2.2 to test installation via dotnet tool install --global PowerShell Everything is working fine.

Unfortunately, VSCode powershell extensions can’t automatically pick up PowerShell installed as .net core global tool and falls back to built-in windows powershell 5.1. For example, I can’t change language mode

Can you modify autodetection mechanics so powershell as global tools picked up correctly?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

3reactions
JustinGrotecommented, Aug 1, 2019

Workaround

This is what I do for my scoop-installed powershells, you can do the same for the dotnet tools global folder

    "powershell.powerShellAdditionalExePaths": [
        {
            "exePath": "C:/Users/JGrote/scoop/apps/pwsh/current/pwsh.exe",
            "versionName": "Powershell"
        },
        {
            "exePath": "C:/Users/JGrote/scoop/apps/pwsh-preview/current/pwsh.exe",
            "versionName": "Powershell Preview"
        }
    ],
0reactions
SydneyhSmithcommented, Jul 14, 2020

@mromanch thanks for this comment, if you would like to have PowerShell show up as an option for Terminal:Default Shell please open an issue in VSCode’s repo as that is one of their editor commands that they would need to update to search for the global tool path…the additionalexespath setting influences the integrated console (rather than the terminal)…apologies for any confusion!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introducing PowerShell as .NET Global Tool
NET Core SDK installed, it's easy to install PowerShell as a .NET global tool! dotnet tool install --global PowerShell.
Read more >
Installing PowerShell with one line as a .NET Core global tool
Being able to easily install PowerShell as a global tool means you can count on it in your scripts, CI/CDs systems, or docker...
Read more >
Updating your .NET Tools components - Max Trinidad
Check Current Version. First, need to list which .NET Tools are currently installed by using the following command: dotnet tool list --global.
Read more >
Creating a Custom .NET Core Global Tool - codeburst
NET Core Global Tool is a special NuGet package that contains a Console application, which can be invoked in a terminal via predefined...
Read more >
Octopus CLI Global Tool
You can install the Octopus CLI as a .NET Core Global Tool. This requires that you have the .NET Core SDK installed.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found