dotnet / dotnet/vscode-dotnet-runtime
Failed to install .NET runtime v8.0 in Windows for bicep extensions
- Dominant language
- TypeScript
- Stars
- 209
- Forks
- 455
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug.
Failed to install .NET runtime v8.0 in Windows for bicep extensions
I'm getting this error:
s-azuretools.vscode-bicep requested to download the .NET Runtime.
Downloading .NET version(s) 8.0.2~x64 ...... Error!
Failed to download .NET 8.0.2~x64:
Your machine policy disables PowerShell language features that may be needed to install .NET. Read more at: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_language_modes?view=powershell-7.3.
If you cannot safely and confidently change the execution policy, try setting a custom existingDotnetPath following our instructions here: https://github.com/dotnet/vscode-dotnet-runtime/blob/main/Documentation/troubleshooting-runtime.md.
Error!
Failed to download .NET 8.0.2~x64:
Your machine policy disables PowerShell language features that may be needed to install .NET. Read more at: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_language_modes?view=powershell-7.3.
If you cannot safely and confidently change the execution policy, try setting a custom existingDotnetPath following our instructions here: https://github.com/dotnet/vscode-dotnet-runtime/blob/main/Documentation/troubleshooting-runtime.md.
Error!
Failed to download .NET 8.0:
.NET Acquisition Failed: Installation failed: Error: Your machine policy disables PowerShell language features that may be needed to install .NET. Read more at: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_language_modes?view=powershell-7.3.
If you cannot safely and confidently change the execution policy, try setting a custom existingDotnetPath following our instructions here: https://github.com/dotnet/vscode-dotnet-runtime/blob/main/Documentation/troubleshooting-runtime.md.
execution policy for user is set to:
Get-ExecutionPolicy
RemoteSigned

When I tried to add the following manually in the .net settings, the vscode is stuck at acquiring dotnetruntime.
{
"workbench.settings.applyToAllProfiles": [],
"dotnetAcquisitionExtension.existingDotnetPath": [
{
"extensionId": "ms-azuretools.vscode-bicep",
"path": "C:\\Program Files\\dotnet\\dotnet.exe"
}
]
}
![Uploading image.png…]()
### Please attach log file(s) here if you have any.
ms-azuretools.vscode-bicep requested to download the .NET Runtime.
Downloading .NET version(s) 8.0.2~x64 ...... Error!
Failed to download .NET 8.0.2~x64:
Your machine policy disables PowerShell language features that may be needed to install .NET. Read more at: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_language_modes?view=powershell-7.3.
If you cannot safely and confidently change the execution policy, try setting a custom existingDotnetPath following our instructions here: https://github.com/dotnet/vscode-dotnet-runtime/blob/main/Documentation/troubleshooting-runtime.md.
Error!
Failed to download .NET 8.0.2~x64:
Your machine policy disables PowerShell language features that may be needed to install .NET. Read more at: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_language_modes?view=powershell-7.3.
If you cannot safely and confidently change the execution policy, try setting a custom existingDotnetPath following our instructions here: https://github.com/dotnet/vscode-dotnet-runtime/blob/main/Documentation/troubleshooting-runtime.md.
Error!
Failed to download .NET 8.0:
.NET Acquisition Failed: Installation failed: Error: Your machine policy disables PowerShell language features that may be needed to install .NET. Read more at: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_language_modes?view=powershell-7.3.
If you cannot safely and confidently change the execution policy, try setting a custom existingDotnetPath following our instructions here: https://github.com/dotnet/vscode-dotnet-runtime/blob/main/Documentation/troubleshooting-runtime.md.
### Reproduction Steps
Download bicep extension and try creating a bicep file. This would load the .netruntime
### Expected Behavior
.netruntime should run
### Exceptions & Errors (if any)
_No response_
### .NET Install Tool Version
v2.0.1
### Your operating system? Please provide more detail, such as the version and or distro above.
Windows
### VS Code Version
1.86.1
Contributor guide
Assessment
This issue has not been assessed yet.