Skip to content

Commit 25de46e

Browse files
committed
feed auth
1 parent 643893e commit 25de46e

File tree

1 file changed

+38
-21
lines changed

1 file changed

+38
-21
lines changed

docs/artifacts/nuget/nuget-exe.md

+38-21
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ monikerRange: '<= azure-devops'
1212

1313
[!INCLUDE [version-lt-eq-azure-devops](../../includes/version-lt-eq-azure-devops.md)]
1414

15-
Azure Artifacts allows developers to both publish and download NuGet packages from various sources, including feeds and public registries. You can use it to privately share packages with your team or specific users and also make them publicly accessible, allowing you to share them openly with anyone on the internet.
15+
Azure Artifacts allows developers to both publish and download NuGet packages from various sources, including feeds and public registries. You can use it to privately share packages with your team or specific users and also make them publicly accessible, allowing you to share them openly with anyone on the internet. This article will guide you through the process of connecting to your feed.
1616

1717
## Prerequisites
1818

@@ -26,46 +26,63 @@ Azure Artifacts allows developers to both publish and download NuGet packages fr
2626

2727
::: moniker range=">= azure-devops-2019"
2828

29-
1. Select **Artifacts** and then select your feed.
29+
1. Sign in to your Azure DevOps organization, and then navigate to your project.
3030

31-
1. Select **Connect to feed**.
31+
1. Select **Artifacts**, and then select your feed from the dropdown menu.
3232

33-
:::image type="content" source="../media/connect-to-feed-azure-devops-newnav.png" alt-text="Screenshot showing the connect to feed button":::
33+
1. Select **Connect to feed**, and then select **NuGet.exe** from the left panel.
3434

35-
1. Select **NuGet.exe** from the left panel.
35+
1. If this is your first time using Azure Artifacts with NuGet.exe, make sure you've installed the prerequisites, otherwise select **Get the tools** in the top-right corner to install them.
3636

37-
1. If this is your first time using Azure Artifacts with NuGet.exe, select **Get the tools** in the top-right corner and follow the instructions to download and install NuGet and Azure Artifacts Credential Provider.
37+
1. Add a *nuget.config* file to your project, and place it in the same folder as your *.csproj* or *.sln* file. Paste the following snippet into it, and be sure to replace the placeholders with the appropriate values specific to your scenario:
3838

39-
1. Follow the instructions in the **Project setup** to set up your nuget.config file.
40-
41-
:::image type="content" source="../media/nuget-azure-devops-newnav.png" alt-text="Screenshot showing how to set up your project's config file":::
39+
- **Project-scoped feed**:
40+
41+
```xml
42+
<?xml version="1.0" encoding="utf-8"?>
43+
<configuration>
44+
<packageSources>
45+
<clear />
46+
<add key="<SOURCE_NAME>" value="https://pkgs.dev.azure.com/<ORGANIZATION_NAME>/<PROJECT_NAME>/_packaging/<FEED_NAME>/nuget/v3/index.json" />
47+
</packageSources>
48+
</configuration>
49+
```
50+
51+
52+
- **Organization-scoped feed**:
53+
54+
```xml
55+
<?xml version="1.0" encoding="utf-8"?>
56+
<configuration>
57+
<packageSources>
58+
<clear />
59+
<add key="<SOURCE_NAME>" value="https://pkgs.dev.azure.com/<ORGANIZATION_NAME>/_packaging/<FEED_NAME>/nuget/v3/index.json" />
60+
</packageSources>
61+
</configuration>
62+
```
4263

4364
::: moniker-end
4465

4566
::: moniker range="tfs-2018"
4667

47-
1. Select **Build and Release** > **Packages**.
68+
1. Navigate to your project `http://ServerName:8080/tfs/DefaultCollection/<ProjectName>`.
4869

49-
1. Select your feed from the dropdown menu.
70+
1. Select **Build and Release**, and then select **Packages**.
5071

51-
1. Select **Connect to feed**.
72+
1. Select your feed from the dropdown menu, and then select **Connect to feed**.
5273

5374
:::image type="content" source="../media/connect-to-feed.png" alt-text="Screenshot showing the connect to feed button in TFS":::
5475

55-
1. Select **NuGet** from the left panel.
56-
57-
1. If this is your first time using Azure Artifacts with NuGet, select the link under **Get the tools** to download and install NuGet and the Credential Provider.
58-
59-
1. Run the command highlighted in step number two to add your feed URL to your nuget.config file.
76+
1. Select **NuGet** from the left panel. Make sure you've installed the prerequisites if this is your first time using Azure Artifacts with NuGet.exe, otherwise select **Get the tools** to download and install them.
6077

61-
:::image type="content" source="../media/nugeturl.png" alt-text="Screenshot showing how to push your package using NuGet.exe in TFS":::
78+
1. Run the command highlighted in step number two (2) to add your feed source URL to your *nuget.config* file.
6279

63-
1. Run the command highlighted in step number three if you want to publish your NuGet package.
80+
:::image type="content" source="../media/nugeturl.png" alt-text="A screenshot showing how to connect to your feed with NuGet in TFS.":::
6481

6582
::: moniker-end
6683

67-
> [!NOTE]
68-
> Azure Artifacts Credential Provider is supported with NuGet 4.8.2 or later. See [Azure Artifacts Credential Provider](https://github.com/microsoft/artifacts-credprovider#azure-artifacts-credential-provider) for more information.
84+
> [!IMPORTANT]
85+
> [Azure Artifacts Credential Provider](https://github.com/microsoft/artifacts-credprovider#azure-artifacts-credential-provider) requires NuGet `4.8.0.5385` or later. Azure Artifacts recommends using NuGet version `5.5.x` or later as it includes crucial bug fixes related to cancellations and timeouts.
6986

7087
::: moniker range="azure-devops"
7188

0 commit comments

Comments
 (0)