dotnet / dotnet/vscode-dotnet-runtime

.NET Acquisition Failed: Installation failed

Open
#1,196 0 comments 0 reactions 0 assignees View on GitHub
cause:powershell-not-found
Dominant language
TypeScript
Stars
209
Forks
455
PR merge metrics
No merged PRs in 30d

Description

Just when you open/reload VSCode after updating C# for Visual Studio Code extension to v2.x (2.0.328) gave the following error below. Reverting extension back to v1.x and all works as expected.

**Error Message:** .NET Acquisition Failed: Installation failed: Error: Command failed: powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "& { [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 ; & 'c:\Users\anonymous\.vscode\extensions\ms-dotnettools.vscode-dotnet-runtime-1.6.0\dist\install scripts\dotnet-install.ps1' -InstallDir 'c:\Users\anonymous\AppData\Roaming\Code\User\globalStorage\ms-dotnettools.vscode-dotnet-runtime\.dotnet\7.0.9' -Version 7.0.9 -Runtime dotnet }
'powershell.exe' is not recognized as an internal or external command,
operable program or batch file.

**Error Stack:** Error: .NET Acquisition Failed: Installation failed: Error: Command failed: powershell.exe -NoProfile -ExecutionPolicy unrestricted -Command "& { [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 ; & 'c:\Users\anonymous\.vscode\extensions\ms-dotnettools.vscode-dotnet-runtime-1.6.0\dist\install scripts\dotnet-install.ps1' -InstallDir 'c:\Users\anonymous\AppData\Roaming\Code\User\globalStorage\ms-dotnettools.vscode-dotnet-runtime\.dotnet\7.0.9' -Version 7.0.9 -Runtime dotnet }
'powershell.exe' is not recognized as an internal or external command,
operable program or batch file.

at c:\Users\anonymous\.vscode\extensions\ms-dotnettools.vscode-dotnet-runtime-1.6.0\dist\extension.js:2:4766

The log file located at c:\Users\anonymous\AppData\Roaming\Code\logs\20230808T111551\window1\exthost\ms-dotnettools.vscode-dotnet-runtime\DotNetAcquisition-ms-dotnettools.vscode-dotnet-runtime-1691482555382.txt is empty.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.