Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 24 additions & 35 deletions getting-started/installation/adding-private-nuget-feed.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,23 @@ position: 5

Telerik maintains a publicly accessible NuGet server, providing a collection of NuGet packages to authenticated users. You can add the NuGet feed to your system by using [Visual Studio's NuGet package manager](#setup-in-visual-studio) or the [NuGet CLI](#setup-with-nuget-cli).

To access the NuGet server, you need an active license for Telerik Reporting (trial or commercial).
To access the NuGet server, you need an active license for Telerik Reporting (trial or commercial) and an API key that you will use instead of a password.

## Generate an API Key

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]({% slug using-nuget-keys %}#using-only-cli-commands) or the [`NuGet.Config` file]({% slug using-nuget-keys %}#using-a-nugetconfig-file-with-your-projects).

1. Go to the [API Keys](https://www.telerik.com/account/downloads/api-keys) page in your Telerik account.
1. Click **Generate New Key +**.

![Manage API Keys](./images/account-generate-api-key.png)

1. In the **Key Note** field, add a note that describes the API key.
1. Click **Generate Key**.
1. Select **Copy and Close**. Once you close the window, you can no longer copy the generated key. For security reasons, the **API Keys** page displays only a portion of the key.
1. Store the generated NuGet API key as you will need it in the next steps. 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.

>API keys expire after two years. Telerik will send you an email when a key is about to expire, but we recommend that you set your own calendar reminder with information about where you used that key: file paths, project links, AzDO and GitHub Action variable names, and so on.

## Setup in Visual Studio

Expand All @@ -28,13 +44,12 @@ To access the NuGet server, you need an active license for Telerik Reporting (tr
1. Create or load your project.
1. Go to __Tools__ > __NuGet Package Manager__ > __Manage NuGet Packages for solution__.
1. In the upper right-hand corner of the __Manage Packages for Solution__ window, select the Telerik __Package source__ that you just added.
1. Depending on your Visual Studio version, choose the __Online__ or __Browse__ list of packages.
1. In the Windows **Authentication** dialog, enter your Telerik credentials. For example, **user: [email protected]** and **password: myPassPhraseForTelerikDotCom**.
1. Enter your credentials only once by selecting the __Remember my password__ checkbox. You may need to escape some [special characters in the password](#handling-special-characters-in-password).
1. Click the **Browse** tab to see the available packages.
1. In the authentication window, enter `api-key` in the **User name** field and the [generated API key](#generate-an-api-key) in the **Password** field.

>caption Enter your Telerik.com credentials to access the Telerik NuGet feed

![Telerik.com credentials form to access the Telerik NuGet Feed](images/nuget-credentials.png)
![Telerik.com credentials form to access the Telerik NuGet Feed](images/vs-nuget-auth-window.png)

After adding the Telerik server, all packages licensed to the authenticated user become available in the Visual Studio NuGet package manager.

Expand All @@ -44,48 +59,22 @@ If you work with Visual Studio Code on Linux or Mac OS, use the Nuget CLI to set

1. Download the latest [NuGet executable](https://dist.nuget.org/win-x86-commandline/latest/nuget.exe).
1. Open a Command Prompt and change the path to the `nuget.exe` location.
1. The command from the example below stores a token in the `%AppData%\NuGet\NuGet.config` file. Your original credentials cannot be obtained from this token.

````powershell
NuGet Sources Add -Name "telerik.com" -Source "https://nuget.telerik.com/v3/index.json" ^
-UserName "your login email" -Password "your password"
````

If you are unable to connect to the feed by using encrypted credentials, store your credentials in clear text.
1. The command from the example below stores your API key in the `%AppData%\NuGet\NuGet.config` file.

````powershell
NuGet Sources Add -Name "telerik.com" -Source "https://nuget.telerik.com/v3/index.json" ^
-UserName "your login email" -Password "your password" ^
-UserName "api-key" -Password "YOUR-API-KEY" ^
-StorePasswordInClearText
````

> Encrypted passwords are only supported on Windows.

If you have already stored a token instead of storing the credentials as clear text, update the definition in the `%AppData%\NuGet\NuGet.config` file by using the following command:
To update expired or invalid login credentials, update the definition in the `%AppData%\NuGet\NuGet.config` file by using the following command:

````powershell
NuGet Sources Update -Name "telerik.com" -Source "https://nuget.telerik.com/v3/index.json" ^
-UserName "your login email" -Password "your password" ^
-UserName "api-key" -Password "YOUR-API-KEY" ^
-StorePasswordInClearText
````


## Handling Special Characters in Password

If your password contains a special character, those characters need to be escaped or it may fail authentication resulting in *Error 401 login failure* from the NuGet server. A common character that needs to be escaped is the ampersand (`&`), but it can be as unique as the section character (`§`). There are two ways to handle this.

1. Change the password so that it only includes characters that do not need to be escaped
1. HTML encodes the password so the special characters are escaped (e.g. `my§uper&P@§§word` becomes `my§uper&P@§§word`).

We strongly discourage entering your password into an online encoder utility, use Powershell instead. Here's one example:

Add-Type -AssemblyName System.Web
[System.Web.HttpUtility]::HtmlEncode('my§uper&P@§§word')

Result:

![Powershell Encoding of a Password containing special characters](images/PowerShellEncodingNugetPassword.png)

## See Also

* [Restoring NuGet Packages in Your CI Workflow]({%slug using-nuget-keys%})
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 37 additions & 17 deletions getting-started/installation/installation-approaches.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ previous_url: /installation-system-requirements, /installation-installing-from-m

# Installation Approaches for Telerik Reporting

Telerik Reporting provides options for installing the product by using [the Control Panel](#using-the-control-panel), by [the MSI installer file](#using-the-msi-file), or [NuGet](#installing-with-nuget). The NuGet packages add the Reporting assemblies to the project, but do not provide design time support.
Telerik Reporting provides options for installing the product by using [the Control Panel](#using-the-control-panel), by [the MSI installer file](#using-the-msi-file), or [NuGet](#using-nuget-packages). The NuGet packages add the Reporting assemblies to the project, but do not provide design time support.

>note After installing the product, you will need to [download and activate/update your Telerik Reporting License Key]({%slug license-key%}).

Expand Down Expand Up @@ -70,36 +70,56 @@ To install Telerik Reporting through the MSI automatic installer file:

## Using NuGet Packages

You can add Telerik Reporting to a project by using the [Telerik Reporting NuGet packages](https://nuget.telerik.com/v3/index.json). The NuGet packages are a single ZIP file with the `.nupkg` extension.
You can add Telerik Reporting to a project by installing NuGet packages hosted on the Telerik NuGet server: `https://nuget.telerik.com/v3/index.json`.

* The `.nupkg` file contains the libraries for .NET Core projects, the Reporting Engine, and the implementation of the [Reporting REST WebAPI-based service]({%slug telerikreporting/using-reports-in-applications/host-the-report-engine-remotely/telerik-reporting-rest-services/asp.net-web-api-implementation/overview%}) where you can use the packages with the standard .NET 4.6.1 framework.
* The Telerik Reporting NuGet packages do not include design-time support.
* The legacy https://nuget.telerik.com/nuget server is now deprecated. Make sure to switch to the new https://nuget.telerik.com/v3/index.json server, which is faster, lighter, and reduces the number of requests from your NuGet client. For more information on how to add a NuGet feed, refer to the [official Microsoft documentation](https://www.visualstudio.com/en-us/docs/package/nuget/consume).

### Adding the Telerik NuGet Feed
Installing the Telerik Reporting NuGet packages involves three steps:

To install the Telerik Reporting NuGet packages, add the Telerik NuGet feed to Visual Studio and install the product. The following video demonstrates the steps for adding the Telerik NuGet feed to Visual Studio. If you prefer, however, you can follow the steps that are listed in writing after the video.
1. [Generating an API key required for the NuGet authentication](#step-1-generating-an-api-key).
1. [Adding the Telerik NuGet server to Visual Studio](#step-2-adding-the-telerik-nuget-package-source-to-visual-studio).
1. [Installing the Telerik Reporting NuGet packages](#step-3-installing-telerik-reporting).

<iframe width="560" height="315" src="https://www.youtube.com/embed/c3m_BLMXNDk" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
### Step 1: Generating an API Key

To configure the Telerik NuGet Feed in Visual Studio:
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]({% slug using-nuget-keys %}#using-only-cli-commands) or the [`NuGet.Config` file]({% slug using-nuget-keys %}#using-a-nugetconfig-file-with-your-projects).

1. Open Visual Studio and go to **Tools** > **NuGet Package Manager** > **Package Manager Settings**.
1. Select **Package Sources** and then click the `+` button to add a new package source.
1. Enter a **Name** for the new package source, for example, **Telerik NuGet**.
1. Add the `https://nuget.telerik.com/v3/index.json` URL as a **Source**. Make sure the URL does not have a trailing slash. Click **OK**.
1. Go to the [API Keys](https://www.telerik.com/account/downloads/api-keys) page in your Telerik account.
1. Click **Generate New Key +**.

### Installing Telerik Reporting
![Manage API Keys](./images/account-generate-api-key.png)

1. In the **Key Note** field, add a note that describes the API key.
1. Click **Generate Key**.
1. Select **Copy and Close**. Once you close the window, you can no longer copy the generated key. For security reasons, the **API Keys** page displays only a portion of the key.
1. Store the generated NuGet API key as you will need it in the next steps. 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.

>API keys expire after two years. Telerik will send you an email when a key is about to expire, but we recommend that you set your own calendar reminder with information about where you used that key: file paths, project links, AzDO and GitHub Action variable names, and so on.

### Step 2: Adding the Telerik NuGet Package Source to Visual Studio

To configure the Telerik NuGet feed in Visual Studio:

1. Open Visual Studio.
1. Go to **Tools > NuGet Package Manager > Package Manager Settings**.
1. Select **Package Sources**, and then click the + button.
1. In the **Source** field, enter `https://nuget.telerik.com/v3/index.json`. If you use a locally available NuGet package downloaded from <a href="https://www.telerik.com/account/" target="_blank">your account</a>, add the path to the local package instead of the URL.
1. Click **Update** and then **OK**.

You have successfully added the Telerik NuGet feed as a Package source.

For more information on how to add a NuGet feed, refer to the [official Microsoft documentation](https://www.visualstudio.com/en-us/docs/package/nuget/consume).

### Step 3: Installing Telerik Reporting

After you have successfully added the Telerik NuGet feed as a package source, you need to authenticate your local NuGet instance and install Telerik Reporting:

1. Create a new Reporting project or open an existing one.
1. Go to **Tools** > **NuGet Package Manager** > **Manage NuGet Packages for Solution...**. Select the Telerik NuGet **Package source** from the drop-down list on the left.
1. Select the **Browse** tab to see the available packages. Enter your Telerik credentials in the Windows Authentication dialog.

> You may need to escape some [special characters in the password]({%slug telerikreporting/using-reports-in-applications/how-to-add-the-telerik-private-nuget-feed-to-visual-studio%}#handling-special-characters-in-password)

1. Select Telerik Reporting and click **Install**.
1. Select the **Browse** tab to see the available packages.
1. In the authentication window, enter `api-key` in the **User name** field and the [generated API key](#step-1-generating-an-api-key) in the **Password** field.
1. Select the desired Telerik Reporting NuGet package and click **Install**.

## See Also

Expand Down
Loading