Skip to content

Commit c54a6c4

Browse files
authored
Merge pull request #180392 from tfitzmac/1118install
split installation troubleshooting
2 parents cf4b5cb + 720007a commit c54a6c4

File tree

3 files changed

+89
-39
lines changed

3 files changed

+89
-39
lines changed

articles/azure-resource-manager/bicep/install.md

Lines changed: 6 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Set up Bicep development and deployment environments
33
description: How to configure Bicep development and deployment environments
44
ms.topic: conceptual
5-
ms.date: 10/20/2021
5+
ms.date: 11/18/2021
66
ms.custom: devx-track-azurepowershell, devx-track-azurecli
77
---
88

@@ -27,44 +27,7 @@ To verify you've installed the extension, open any file with the `.bicep` file e
2727

2828
:::image type="content" source="./media/install/language-mode.png" alt-text="Bicep language mode":::
2929

30-
### Troubleshoot
31-
32-
When installing the Bicep extension for Visual Studio Code, you may run into the following error messages:
33-
34-
```error
35-
Failed to install .NET runtime v5.0
36-
```
37-
38-
```error
39-
Failed to download .NET 5.0.x ....... Error!
40-
```
41-
42-
To solve the problem, you can manually install .NET from the [.NET website](https://aka.ms/dotnet-core-download), and then configure Visual Studio Code to reuse an existing installation of .NET. with the following settings:
43-
44-
**Windows**
45-
46-
```json
47-
"dotnetAcquisitionExtension.existingDotnetPath": [
48-
{
49-
"extensionId": "ms-azuretools.vscode-bicep",
50-
"path": "C:\\Program Files\\dotnet\\dotnet.exe"
51-
}
52-
]
53-
54-
```
55-
56-
**macOS**
57-
58-
```json
59-
"dotnetAcquisitionExtension.existingDotnetPath": [
60-
{
61-
"extensionId": "ms-azuretools.vscode-bicep",
62-
"path": "/usr/local/share/dotnet/dotnet"
63-
}
64-
]
65-
```
66-
67-
See [User and Workspace Settings](https://code.visualstudio.com/docs/getstarted/settings) for configuring Visual Studio Code settings.
30+
If you get an error during installation, see [Troubleshoot Bicep installation](installation-troubleshoot.md).
6831

6932
## Deployment environment
7033

@@ -111,6 +74,8 @@ For more commands, see [Bicep CLI](bicep-cli.md).
11174
> [!IMPORTANT]
11275
> Azure CLI installs a self-contained instance of the Bicep CLI. This instance doesn't conflict with any versions you may have manually installed. Azure CLI doesn't add Bicep CLI to your PATH.
11376
77+
You're done with setting up your Bicep environment. The rest of this article describes installation steps that you don't need when using Azure CLI.
78+
11479
## Azure PowerShell
11580

11681
You must have Azure PowerShell version **5.6.0 or later** installed. To update or install, see [Install Azure PowerShell](/powershell/azure/install-az-ps).
@@ -249,3 +214,5 @@ If you'd like to try the latest pre-release bits of Bicep before they're release
249214
## Next steps
250215

251216
For more information about using Visual Studio Code and the Bicep extension, see [Quickstart: Create Bicep files with Visual Studio Code](./quickstart-create-bicep-use-visual-studio-code.md).
217+
218+
If you have problems with your Bicep installation, see [Troubleshoot Bicep installation](installation-troubleshoot.md).
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
title: Troubleshoot problems with Bicep installation
3+
description: How to resolve errors and problems with your Bicep installation.
4+
ms.topic: conceptual
5+
ms.date: 11/18/2021
6+
---
7+
8+
# Troubleshoot Bicep installation
9+
10+
This article describes how to resolve potential errors in your Bicep installation.
11+
12+
## .NET runtime error
13+
14+
When installing the Bicep extension for Visual Studio Code, you may run into the following error messages:
15+
16+
```error
17+
Failed to install .NET runtime v5.0
18+
```
19+
20+
```error
21+
Failed to download .NET 5.0.x ....... Error!
22+
```
23+
24+
To solve the problem, you can manually install .NET from the [.NET website](https://aka.ms/dotnet-core-download), and then configure Visual Studio Code to reuse an existing installation of .NET with the following settings:
25+
26+
**Windows**
27+
28+
```json
29+
"dotnetAcquisitionExtension.existingDotnetPath": [
30+
{
31+
"extensionId": "ms-azuretools.vscode-bicep",
32+
"path": "C:\\Program Files\\dotnet\\dotnet.exe"
33+
}
34+
]
35+
36+
```
37+
38+
**macOS**
39+
40+
If you need an **x64** installation, use:
41+
42+
```json
43+
"dotnetAcquisitionExtension.existingDotnetPath": [
44+
{
45+
"extensionId": "ms-azuretools.vscode-bicep",
46+
"path": "/usr/local/share/dotnet/x64/dotnet"
47+
}
48+
]
49+
```
50+
51+
For other **macOS** installations, use:
52+
53+
```json
54+
"dotnetAcquisitionExtension.existingDotnetPath": [
55+
{
56+
"extensionId": "ms-azuretools.vscode-bicep",
57+
"path": "/usr/local/share/dotnet/dotnet"
58+
}
59+
]
60+
```
61+
62+
See [User and Workspace Settings](https://code.visualstudio.com/docs/getstarted/settings) for configuring Visual Studio Code settings.
63+
64+
## Two versions of Bicep CLI installed
65+
66+
If you manually install the Bicep CLI to more than one location, you may notice unexpected behavior such as the Bicep CLI not updating when you run the [upgrade command](bicep-cli.md#upgrade). Or, you may notice that running `az bicep version` returns one version, but `bicep --version` returns a different version.
67+
68+
To resolve this issue, you can either update both locations, or delete one location and add the other location to your path.
69+
70+
To **keep both installation locations**, use `az bicep upgrade` to update one version. For the other version, use the same method you used earlier to [manually install the Bicep CLI](install.md#install-manually).
71+
72+
To **keep only one installation location**, use the following steps:
73+
74+
1. Open your command prompt (not PowerShell), and run `where bicep`. This command returns the location of the Bicep installation.
75+
1. Delete the installation that was returned in the previous step.
76+
1. Remove the location from your **PATH** environment variable.
77+
1. Add your other installation location to the **PATH** variable. For Windows, the location maintained by Azure CLI is `%USERPROFILE%\.Azure\bin`.
78+
79+
## Next steps
80+
81+
For more information about using Visual Studio Code and the Bicep extension, see [Quickstart: Create Bicep files with Visual Studio Code](./quickstart-create-bicep-use-visual-studio-code.md).

articles/azure-resource-manager/bicep/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
- name: Install Bicep tools
1313
href: install.md
1414
displayName: nightly
15+
- name: Troubleshoot installation
16+
href: installation-troubleshoot.md
1517
- name: Quickstarts
1618
items:
1719
- name: Create Bicep templates - VS Code

0 commit comments

Comments
 (0)