You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/bicep/msbuild-bicep-file.md
+14-5Lines changed: 14 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,14 @@ You need the latest versions of the following software:
19
19
-[Visual Studio](/visualstudio/install/install-visual-studio), or [Visual Studio Code](./install.md#visual-studio-code-and-bicep-extension). The Visual Studio community version, available for free, installs .NET 6.0, .NET Core 3.1, .NET SDK, MSBuild, .NET Framework 4.8, NuGet package manager, and C# compiler. From the installer, select **Workloads** > **.NET desktop development**. With Visual Studio Code, you also need the extensions for [Bicep](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-bicep) and [Azure Resource Manager (ARM) Tools](https://marketplace.visualstudio.com/items?itemName=msazurermtools.azurerm-vscode-tools)
20
20
-[PowerShell](/powershell/scripting/install/installing-powershell) or a command-line shell for your operating system.
21
21
22
+
If your environment doesn't have nuget.org configured as a package feed, depending on how `nuget.config` is configured, you might need to run the following command:
In certain environments, using a single package feed helps prevent problems arising from packages with the same ID and version containing different contents in different feeds. For Azure Artifacts users, this can be done using the [upstream sources feature](/azure/devops/artifacts/concepts/upstream-sources).
29
+
22
30
## MSBuild tasks and Bicep packages
23
31
24
32
From your continuous integration (CI) pipeline, you can use MSBuild tasks and CLI packages to convert Bicep files and Bicep parameter files into JSON. The functionality relies on the following NuGet packages:
@@ -34,11 +42,11 @@ You can find the latest version from these pages. For example:
34
42
35
43
:::image type="content" source="./media/msbuild-bicep-file/bicep-nuget-package-version.png" alt-text="Screenshot showing how to find the latest Bicep NuGet package version." border="true":::
36
44
37
-
The latest NuGet package versions match the latest [Bicep CLI](./bicep-cli.md) version.
45
+
The latest NuGet package versions match the latest [Bicep CLI](./bicep-cli.md) version.
38
46
39
47
-**Azure.Bicep.MSBuild**
40
48
41
-
When included in project file's `PackageReference` property, the `Azure.Bicep.MSBuild` package imports the Bicep task used for invoking the Bicep CLI.
49
+
When included in project file's `PackageReference` property, the `Azure.Bicep.MSBuild` package imports the Bicep task used for invoking the Bicep CLI.
42
50
43
51
```xml
44
52
<ItemGroup>
@@ -81,7 +89,7 @@ The latest NuGet package versions match the latest [Bicep CLI](./bicep-cli.md) v
81
89
82
90
-**Azure.Bicep.CommandLine**
83
91
84
-
The `Azure.Bicep.CommandLine.*` packages are available for Windows, Linux, and macOS. The following example references the package for Windows.
92
+
The `Azure.Bicep.CommandLine.*` packages are available for Windows, Linux, and macOS. The following example references the package for Windows.
85
93
86
94
```xml
87
95
<ItemGroup>
@@ -285,6 +293,7 @@ Build a project in .NET with the dotnet CLI.
285
293
New-Item -Name .\msBuildDemo -ItemType Directory
286
294
Set-Location -Path .\msBuildDemo
287
295
```
296
+
288
297
1. Run the `dotnet` command to create a new console with the .NET 6 framework.
289
298
290
299
```powershell
@@ -308,6 +317,7 @@ Build a project in .NET Core 3.1 using the dotnet CLI.
308
317
New-Item -Name .\msBuildDemo -ItemType Directory
309
318
Set-Location -Path .\msBuildDemo
310
319
```
320
+
311
321
1. Run the `dotnet` command to create a new console with the .NET 6 framework.
312
322
313
323
```powershell
@@ -390,7 +400,6 @@ You need a Bicep file and a BicepParam file to be converted to JSON.
390
400
391
401
Replace `{prefix}` with a string value used as a prefix for the storage account name.
392
402
393
-
394
403
### Run MSBuild
395
404
396
405
Run MSBuild to convert the Bicep file and the Bicep parameter file to JSON.
@@ -411,7 +420,7 @@ Run MSBuild to convert the Bicep file and the Bicep parameter file to JSON.
0 commit comments