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: installation/nuget.md
+37-49Lines changed: 37 additions & 49 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,14 +20,29 @@ You can set up the remote Telerik NuGet feed in the following ways:
20
20
*[Use the .NET CLI](#use-the-net-cli)
21
21
*[Edit the Nuget.Config file](#edit-the-nuget-config-file)
22
22
23
-
>tip When working with the .NET CLI or editing the `NuGet.Config` manually, you can use your Telerik account credentials or a [NuGet API Key](#use-nuget-api-key). If you are logging in to telerik.com through single sign-on (SSO), use a [NuGet API Key](#use-nuget-api-key).
23
+
Regardless of how you set up the Telerik NuGet feed, you must first [generate a NuGet API key](#generate-a-nuget-api-key) needed for the authentication.
24
24
25
-
>warning Never hard-code Telerik account credentials or NuGet API keys in a `NuGet.Config` file in a GitHub repository, Docker image, or any location that may be accessed by unauthorized parties. A NuGet key is valuable and bad actors can use it to access the NuGet packages that are licensed under your account. A credentials abuse can lead to a review of the affected Telerik account.
25
+
>warning Never hard-code your Telerik NuGet API keys in a `NuGet.Config` file in a GitHub repository, Docker image, or any location that may be accessed by unauthorized parties. A NuGet key is valuable and bad actors can use it to access the NuGet packages that are licensed under your account. A credentials abuse can lead to a review of the affected Telerik account.
26
26
27
27
For NuGet-related issues, see [NuGet Feed Troubleshooting](slug:troubleshooting-nuget).
28
28
29
29
For information on automated builds, CI and CD, see [CI, CD, Build Server](slug:deployment-ci-cd-build-pc).
30
30
31
+
## Generate a NuGet API Key
32
+
33
+
As the Telerik NuGet server requires authentication, the first step is to obtain an API key that you will use instead of a password. Using an API key instead of a password is a more secure approach, especially when working with [.NET CLI](#use-the-net-cli) or the [`NuGet.Config` file](#edit-the-nugetconfig-file).
34
+
35
+
1. Go to the [NuGet Keys](https://www.telerik.com/account/downloads/nuget-keys) page in your Telerik account.
1. In the **Key Note** field, add a note that describes the API key.
41
+
1. Click **Generate Key**.
42
+
1. Select **Copy and Close**. Once you close the window, you can no longer copy the generated key. For security reasons, the **NuGet Keys** page displays only a portion of the key.
43
+
1. Store the generated NuGet API key as you will need it in the next steps.
44
+
45
+
Whenever you need to authenticate your system with the Telerik NuGet server, use `api-key` as the username and your generated API key as the password.
31
46
32
47
## Use Visual Studio
33
48
@@ -44,34 +59,35 @@ Refer to the [Microsoft documentation about using packages in Visual Studio](htt
44
59
1. Click OK.
45
60
46
61
1. Open a project that references a Telerik NuGet package. For example, generate one through our [New Project Wizard](slug:getting-started-vs-integration-new-project).
47
-
* Make sure to remove local `NuGet.Config` files from the solution that contain information about Telerik packages.
48
-
62
+
* Make sure to remove local `NuGet.Config` files from the solution that contain information about Telerik packages.
63
+
49
64
1. Rebuild the solution.
50
65
51
-
1. A Windows prompt will ask for the Telerik feed credentials. Enter your Telerik email and password.
52
-
* Check the Remember My Password checkbox.
53
-
54
-
1. Your project should now build and restore all packages - including those from nuget.org and from Telerik.
55
-
* If you experience issues, see the [NuGet Feed Troubleshooting](slug:troubleshooting-nuget) article.
66
+
1. In the Windows authentication prompt:
56
67
68
+
7.1. Enter `api-key` in the **User Name** field.
57
69
58
-
## Use the .NET CLI
70
+
7.2. Enter your [NuGet API key](#generate-a-nuget-api-key) in the **Password** field.
71
+
72
+
7.3. Check the **Remember My Password** checkbox.
59
73
60
-
When adding NuGet sources from the .NET CLI, the credentials are stored in the `NuGet.Config` file. The [password can be encrypted on Windows, but with limitations](#store-encrypted-credentials). You can use a plain text password, but for better security, [generate a NuGet API Key](#use-nuget-api-key), and use it with the .NET CLI instead of a password.
74
+
1. Your project should now build and restore all packages—including those from nuget.org and from Telerik.
75
+
* If you experience issues, see the [NuGet Feed Troubleshooting](slug:troubleshooting-nuget) article.
61
76
62
-
To add the Telerik NuGet package source with the .NET CLI, use the [`dotnet nuget add source`](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-add-source) command. This command creates or updates a `NuGet.Config` file for you, so you don't have to [edit it manually](#edit-the-nuget-config-file).
77
+
## Use the .NET CLI
63
78
64
-
The command below stores the password or NuGet API Key in plain text in the [global config file](https://learn.microsoft.com/en-us/nuget/consume-packages/configuring-nuget-behavior#config-file-locations-and-uses).
79
+
To add the Telerik NuGet package source with the .NET CLI, use the [`dotnet nuget add source`](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-nuget-add-source) command. The command shown below creates or updates a `NuGet.Config`file for you, so you don't have to [edit it manually](#edit-the-nugetconfig-file):
65
80
66
-
The backslashes `\` below enable multi-line commands for better readability in terminals that support them.
81
+
* The command adds the Telerik NuGet source, uses your [NuGet API key](#generate-a-nuget-api-key) for authentication, and stores the API key in plain text in the [global config file](https://learn.microsoft.com/en-us/nuget/consume-packages/configuring-nuget-behavior#config-file-locations-and-uses).
82
+
* The backslashes `\` enable multi-line commands for better readability in terminals that support them.
67
83
68
84
>caption Use the .NET CLI to add the Telerik NuGet source
The .NET CLI supports NuGet password encryption only on the Windows platform. Note that [the encrypted password in the `NuGet.Config` file will work only for one user and one machine](https://learn.microsoft.com/en-us/nuget/reference/nuget-config-file#packagesourcecredentials).
93
-
94
-
If you [add the Telerik package source in Visual Studio](#use-visual-studio), the credentials will be encrypted and stored in the Windows Credential Manager on Windows and in the Keychain on macOS.
95
-
96
-
You can read more about the options provided by the NuGet tooling in the <ahref="https://docs.microsoft.com/en-us/nuget/reference/nuget-config-file#packagesourcecredentials"target="_blank">packageSourceCredentials section of the NuGet.Config reference</a> article by Microsoft. Note the difference between the `password` and `cleartextpassword` options.
97
-
98
-
99
106
## Edit the NuGet.Config File
100
107
101
108
NuGet package sources and other settings are stored in a `NuGet.Config` file. You can read more about the file structure in the Microsoft article [NuGet.Config Reference](https://learn.microsoft.com/en-us/nuget/reference/nuget-config-file).
@@ -106,7 +113,7 @@ To edit a `NuGet.Config` file and add the Telerik feed, you need to:
106
113
107
114
1. Ensure you are editing the [correct and desired config file](https://learn.microsoft.com/en-us/nuget/consume-packages/configuring-nuget-behavior#config-file-locations-and-uses). You can also create a new one with the [`dotnet new nugetconfig` command](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-new).
108
115
109
-
2. Add the Telerik package source to the config file. Use plain text credentials, because the .NET Core NuGet tooling does not fully support encrypted credentials. Here is an example of how your `NuGet.Config` file can look like:
116
+
2. Add the Telerik package source to the config file. For the authentication, use your [NuGet API key](#generate-a-nuget-api-key) as a password and `api-key` as a username. Here is an example of how your `NuGet.Config` file can look like:
110
117
111
118
````XML.skip-repl
112
119
<?xml version="1.0" encoding="utf-8"?>
@@ -119,25 +126,13 @@ To edit a `NuGet.Config` file and add the Telerik feed, you need to:
119
126
</packageSources>
120
127
<packageSourceCredentials>
121
128
<TelerikOnlineFeed>
122
-
<add key="Username" value="<TELERIK EMAIL or api-key>" />
123
-
<add key="ClearTextPassword" value="<TELERIK PASSWORD or NUGETAPIKEY>" />
129
+
<add key="api-key>" />
130
+
<add key="YOUR-NUGET-API-KEY" />
124
131
</TelerikOnlineFeed>
125
132
</packageSourceCredentials>
126
133
</configuration>
127
134
````
128
135
129
-
## Use NuGet API Key
130
-
131
-
There are two ways to authenticate with the Telerik NuGet server when you add the Telerik NuGet source [with the .NET CLI](#use-the-net-cli) or [edit the `NuGet.Config` file manually](#edit-the-nuget-config-file):
132
-
133
-
* Use your Telerik account email as the username, and your Telerik password.
134
-
* Use `api-key` as the username and your personal [NuGet API Key](slug:deployment-nuget) as the password.
135
-
136
-
You can [generate your Telerik NuGet API Key on telerik.com](https://www.telerik.com/account/downloads/nuget-keys). Read more about [using NuGet API Keys in different environments](slug:deployment-nuget).
137
-
138
-
> Always use the NuGet API Key in plain text.
139
-
140
-
141
136
## Package Source Mapping
142
137
143
138
The `Telerik.UI.for.Blazor` NuGet package and most of its dependencies reside on `nuget.telerik.com`. On the other hand, the [Telerik icon packages](slug:common-features-icons) and the [`Telerik.Licensing` package](slug:installation-license-key) reside on `nuget.org`. The correct [package source mapping](https://learn.microsoft.com/en-us/nuget/consume-packages/package-source-mapping) configuration should be similar to the one below.
@@ -173,7 +168,6 @@ The `Telerik.UI.for.Blazor` NuGet package and most of its dependencies reside on
173
168
</configuration>
174
169
````
175
170
176
-
177
171
## Access NuGet Packages behind Firewall
178
172
179
173
To access the Telerik NuGet feed behind a firewall that restricts outgoing requests, you may need to allow the following domains:
@@ -183,12 +177,6 @@ To access the Telerik NuGet feed behind a firewall that restricts outgoing reque
183
177
184
178
The firewall must allow some of the requests to be redirected from `nuget.telerik.com` to `downloads.cdn.telerik.com`.
185
179
186
-
187
-
## Obsolete Telerik NuGet URL
188
-
189
-
The NuGet v2 server at `https://nuget.telerik.com/nuget` was sunset in November 2024 and is no longer available. The v3 protocol offers faster package searches and restores, improved security, and more reliable infrastructure. To redirect your feed to the NuGet v3 protocol, all you have to do is to change your NuGet package source URL to `https://nuget.telerik.com/v3/index.json`.
190
-
191
-
192
180
## Troubleshooting
193
181
194
182
See the [NuGet Troubleshooting](slug:troubleshooting-nuget) article for tips about common pitfalls when working with the Telerik NuGet feed.
0 commit comments