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
|**Azure DevOps**| - An Azure DevOps [organization](../../organizations/accounts/create-organization.md).<br>- An Azure DevOps [project](../../organizations/projects/create-project.md).<br> - An Azure Artifacts [feed](../get-started-nuget.md#create-a-feed).<br> - Download and install the [Azure Artifacts Credential Provider](https://github.com/microsoft/artifacts-credprovider).<br> - Download and install [.NET Core SDK (2.1.400+)](https://dotnet.microsoft.com/en-us/download). |
23
23
24
+
## Create a feed
25
+
26
+
If you already have a feed, proceed to the next step. Otherwise, follow the instructions below to create a new one:
27
+
28
+
1. Sign in to your Azure DevOps, and navigate to your project.
29
+
30
+
1. Select **Artifacts**, and then select **Create Feed**.
31
+
32
+
1. Enter a descriptive **Name** for your feed and define its **Visibility** (who can use your feed). Specify the **Scope** of your feed, and if you wish to include packages from public sources, check the **Include packages from common public sources** checkbox.
33
+
34
+
1. Select **Create** when you're done.
35
+
24
36
## Connect to a feed
25
37
38
+
Before you can publish packages to your feed, you must authenticate with Azure Artifacts, follow the instructions below to setup your project and authenticate with your feed:
1. Sign in to your Azure DevOps organization, and then navigate to your project.
@@ -33,29 +49,54 @@ This guide walks you through configuring your project to publish NuGet packages
33
49
34
50
1. Create a *nuget.config* file in the same folder as your *csproj* or *sln* file. Copy the following XML snippet and paste it into your new file, replacing the placeholders with the relevant information:
1. Sign in to your Azure DevOps server, and then navigate to your project.
67
+
68
+
1. Select **Artifacts**, and then select your feed.
69
+
70
+
1. Select **Connect to Feed**, and then select **dotnet** from the left navigation pane.
71
+
72
+
1. Follow the instructions in the **Project setup** section to connect to your feed.
73
+
74
+
:::image type="content" source="../media/connect-to-feed-dotnet-server-2020-and-2022.png" alt-text="A screenshot showing how to connect to a feed with dotnet in Azure DevOps Server 2020 and 2022." lightbox="../media/connect-to-feed-dotnet-server-2020-and-2022.png":::
1. Sign in to your Azure DevOps organization, and then navigate to your project.
83
+
84
+
1. Select **Artifacts**, and then select your feed from the dropdown menu.
85
+
86
+
1. Select **Connect to feed**, and then select **dotnet** from the *NuGet* section on the left.
87
+
88
+
1. Create a *nuget.config* file in the same folder as your *csproj* or *sln* file. Copy the following XML snippet and paste it into your new file, replacing the placeholders with the relevant information:
dotnet nuget push --source https://pkgs.dev.azure.com/MyOrg/MyProject/_packaging/MyFeed/nuget/v3/index.json --api-key AZ bin/MyPackage.5.0.2.nupkg
87
128
```
88
129
89
-
90
130
> [!NOTE]
91
-
> The `api-key` is required, but you can provide any string as its value when publishing to an Azure Artifacts feed.
131
+
> The `api-key`parameter is required when publishing to an Azure Artifacts feed, but you can use any string as its value.
92
132
93
-
## Publish packages to a feed in another organization
133
+
## Publish packages to a feed in a different organization
94
134
95
-
To publish your NuGet packages to a feed in a different Azure DevOps organization, you must first create a personal access token (PAT) in the target organization.
135
+
To publish your NuGet packages to a feed in a different Azure DevOps organization, you must first create a personal access token (PAT) in the target organization, add the new package source to your configuration file, and then run the publish command:
96
136
97
137
1. Navigate to the organization hosting the target feed and create a [personal access token](../../organizations/accounts/use-personal-access-tokens-to-authenticate.md) (PAT) with **Packaging** > **Read & write** scope.
> If your organization is using a firewall or a proxy server, make sure you allow the [Azure Artifacts Domain URLs and IP addresses](../../organizations/security/allow-list-ip-url.md#azure-artifacts).
121
-
160
+
> If your organization uses a firewall or proxy server, make sure that the [Azure Artifacts Domain URLs and IP addresses](../../organizations/security/allow-list-ip-url.md#azure-artifacts) are allowed.
0 commit comments