Skip to content

Commit 500a7d1

Browse files
Merge pull request #264848 from mumian/0131-msbuild-feed
msbuild and nuget package feed
2 parents 7129959 + 416fa34 commit 500a7d1

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

articles/azure-resource-manager/bicep/msbuild-bicep-file.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ You need the latest versions of the following software:
1919
- [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)
2020
- [PowerShell](/powershell/scripting/install/installing-powershell) or a command-line shell for your operating system.
2121

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:
23+
24+
```powershell
25+
dotnet nuget add source https://api.nuget.org/v3/index.json -n nuget.org
26+
```
27+
28+
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+
2230
## MSBuild tasks and Bicep packages
2331

2432
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:
3442

3543
:::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":::
3644

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.
3846

3947
- **Azure.Bicep.MSBuild**
4048

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.
4250

4351
```xml
4452
<ItemGroup>
@@ -81,7 +89,7 @@ The latest NuGet package versions match the latest [Bicep CLI](./bicep-cli.md) v
8189

8290
- **Azure.Bicep.CommandLine**
8391

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.
8593

8694
```xml
8795
<ItemGroup>
@@ -285,6 +293,7 @@ Build a project in .NET with the dotnet CLI.
285293
New-Item -Name .\msBuildDemo -ItemType Directory
286294
Set-Location -Path .\msBuildDemo
287295
```
296+
288297
1. Run the `dotnet` command to create a new console with the .NET 6 framework.
289298
290299
```powershell
@@ -308,6 +317,7 @@ Build a project in .NET Core 3.1 using the dotnet CLI.
308317
New-Item -Name .\msBuildDemo -ItemType Directory
309318
Set-Location -Path .\msBuildDemo
310319
```
320+
311321
1. Run the `dotnet` command to create a new console with the .NET 6 framework.
312322
313323
```powershell
@@ -390,7 +400,6 @@ You need a Bicep file and a BicepParam file to be converted to JSON.
390400
391401
Replace `{prefix}` with a string value used as a prefix for the storage account name.
392402
393-
394403
### Run MSBuild
395404
396405
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.
411420
dotnet build .\msBuildDemo.csproj
412421
```
413422
414-
or
423+
or
415424
416425
```powershell
417426
dotnet restore .\msBuildDemo.csproj

0 commit comments

Comments
 (0)