Skip to content

Commit 0d68be3

Browse files
committed
v2 services
1 parent f018364 commit 0d68be3

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

docs/artifacts/nuget/nuget-exe.md

+22-21
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ monikerRange: '<= azure-devops'
1212

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

15-
[!INCLUDE [nuget-recommended-version](../includes/nuget/nuget-recommended-version.md)]
16-
1715
## Project setup
1816

1917
::: moniker range=">= azure-devops-2019"
@@ -44,49 +42,52 @@ monikerRange: '<= azure-devops'
4442

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

47-
1. Follow the highlighted steps to get the tools, add the feed to your local NuGet configuration, and push your package.
45+
1. Select **NuGet** from the left panel.
46+
47+
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.
48+
49+
1. Run the command highlighted in step number two to add your feed URL to your nuget.config file.
4850

4951
:::image type="content" source="../media/nugeturl.png" alt-text="Screenshot showing how to push your package using NuGet.exe in TFS":::
50-
52+
53+
1. Run the command highlighted in step number three if you want to publish your NuGet package.
54+
5155
::: moniker-end
5256

5357
> [!NOTE]
54-
> Azure Artifacts Credential Provider is supported in NuGet version 4.8.2 or later. See [Creating a NuGet credential provider](/nuget/reference/extensibility/nuget-exe-credential-providers#creating-a-nugetexe-credential-provider) for more information.
55-
58+
> 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.
5659
5760
::: moniker range="azure-devops"
5861

59-
## Project setup (NuGet 2)
60-
61-
With NuGet version 2, you must use a Personal Access Tokens to authenticate to your feed. To do so, we must first get the package source URL:
62+
## Legacy project setup (NuGet v2)
6263

63-
1. Select **Artifacts** and then select your feed.
64+
1. Select **Artifacts** and then select your feed.
6465

6566
1. Select **Connect to feed**.
6667

6768
:::image type="content" source="../media/connect-to-feed-azure-devops-newnav.png" alt-text="Screenshot showing the connect to feed button":::
6869

6970
1. Select **NuGet.exe** from the left panel.
70-
71+
7172
1. Copy your package source URL, and then replace `/v3/index.json` with `/v2`.
7273

7374
:::image type="content" source="../media/nuget-consume-url-azure-devops-newnav.png" alt-text="Screenshot showing the source URL":::
7475

7576
1. Create a [Personal Access Token](../../organizations/accounts/use-personal-access-tokens-to-authenticate.md#create-a-pat). Scope your PAT to the organization(s) you want to access and to one of the following scopes: Packaging (read), Packaging (read and write), or Packaging (read, write, and manage).
7677

77-
Run the following command in an elevated command prompt window to add your package source:
78-
79-
```Command
80-
nuget sources add -name <Feed_Name> -source <Feed_URL> -username <Any_String_But_Not_Null> -password <Personal_Access_Token>
81-
```
78+
1. Run the following command in an elevated command prompt window to add your package source:
8279

83-
If your organization is connected to Azure Active Directory, you must first authenticate with your AD credentials, and then add your personal access token using the *setapikey* command:
80+
```Command
81+
nuget sources add -name <Feed_Name> -source <Feed_URL> -username <Any_String_But_Not_Null> -password <Personal_Access_Token>
82+
```
8483

85-
```Command
86-
nuget sources add -name <Feed_Name> -source <Feed_URL> -username <Azure_Active_Directory_UserName> -password <Azure_Active_Directory_Password>
84+
1. If your organization is connected to Azure Active Directory, you must first authenticate with your AD credentials, and then add your personal access token using the *setapikey* command:
8785

88-
nuget setapikey <Personal_Access_Token> -source <Feed_URL>
89-
```
86+
```Command
87+
nuget sources add -name <Feed_Name> -source <Feed_URL> -username <Azure_Active_Directory_UserName> -password <Azure_Active_Directory_Password>
88+
89+
nuget setapikey <Personal_Access_Token> -source <Feed_URL>
90+
```
9091

9192
::: moniker-end
9293

0 commit comments

Comments
 (0)