# Setting Up Your License Key File

Telerik UI for ASP.NET MVC requires activation through a license key for both trial and commercial licenses. This article describes how to download your personal license key and use it to activate the UI for ASP.NET MVC components. An invalid license results in [errors and warnings](https://www.telerik.com/aspnet-mvc/documentation/installation/activating-your-license/license-key-errors) during build and run-time indicators such as watermarks and banners.

> tip Starting with Telerik UI for ASP.NET MVC 2025 Q1 release, you must activate the UI components by providing a license key file. Previous versions require a [script key](https://www.telerik.com/aspnet-mvc/documentation/installation/activating-your-license/legacy-licensing) instead of a license key file.

## Basics

To install a license key, you must have a developer or trial license for:

* Telerik UI for ASP.NET MVC
* Any product bundle that includes Telerik UI for ASP.NET MVC, such as DevCraft.

If you are new to Telerik UI for ASP.NET MVC, <a href="https://www.telerik.com/aspnet-mvc" target="_blank">sign up for a free trial</a>.

The `Telerik.UI.for.AspNet.Mvc5` NuGet package [depends on the `Telerik.Licensing` NuGet package](https://www.telerik.com/aspnet-mvc/documentation/installation/installation-options/nuget-install#telerik-packages-available-on-the-telerik-nuget-feed). During project build, the `Telerik.Licensing` package automatically verifies the license key and activates Telerik UI for ASP.NET MVC in that project.

Follow the steps below for [automatic](https://www.telerik.com/aspnet-mvc/documentation/installation/activating-your-license/setting-up-your-license#automatic-installation) or [manual](https://www.telerik.com/aspnet-mvc/documentation/installation/activating-your-license/setting-up-your-license#manual-installation) license key installation in your local development environment. To build UI for ASP.NET MVC apps in a CI/CD environment, [set up a Telerik license key in CI/CD](https://www.telerik.com/aspnet-mvc/documentation/deployment/ci-cd-license-key).

> The Telerik UI NuGet package (therefore, the Kendo.Mvc.dll that comes with the package) must be the same version as the Kendo UI script files referenced in the project's Layout file.

An [invalid or missing license key results in app build warnings](https://www.telerik.com/aspnet-mvc/documentation/installation/activating-your-license/license-key-errors) and watermarks in the application UI.

> warning The license key file is personal and confidential. Do not commit this file to source control and do not save it to a publicly accessible location!

## Automatic Installation

To download and install your Telerik license key automatically, use either of the following Telerik productivity tools:

* <a href="https://docs.telerik.com/controlpanel/introduction" target="_blank">Telerik Control Panel</a>—this tool downloads and installs different Telerik products on your machine.
* [Telerik UI for ASP.NET MVC Visual Studio extension](https://www.telerik.com/aspnet-mvc/documentation/vs-integration/introduction)—this tool adds or upgrades Telerik UI for ASP.NET MVC in new or existing apps.

The above tools download and install a license key for you and make it available for all projects that you develop on your local machine. The license key file and location is specified in the [Manual Installation](https://www.telerik.com/aspnet-mvc/documentation/installation/activating-your-license/setting-up-your-license#manual-installation) section below.

> tip Update your license key [whenever you renew or purchase a new Telerik license](https://www.telerik.com/aspnet-mvc/documentation/installation/activating-your-license/setting-up-your-license#license-key-updates).

## Manual Installation

To download and install your Telerik license key:

1. Go to the <a href="https://www.telerik.com/account/your-licenses/license-keys" target="_blank">License Keys page</a> in your Telerik account.
2. Click the **Download License Key** button.
3. Save the `telerik-license.txt` file to:
   * (on Windows) `%AppData%\Telerik\telerik-license.txt`, for example, `C:\Users\...\AppData\Roaming\Telerik\telerik-license.txt`
   * (on Mac or Linux) `~/.telerik/telerik-license.txt`, for example, `/Users/.../.telerik/telerik-license.txt`

This will make the license key available to all Telerik .NET apps that you develop on your local machine.
If you need to activate Telerik UI for ASP.NET MVC only in a specific app, then save `telerik-license.txt` to the root folder of your project or solution.

> tip Update your license key [whenever you renew or purchase a new Telerik license](https://www.telerik.com/aspnet-mvc/documentation/installation/activating-your-license/setting-up-your-license#license-key-updates).

By default, when you have an active license, the [required Kendo UI scripts](https://www.telerik.com/aspnet-mvc/documentation/installation/adding-client-side-resources/getting-started-copy-client-resources) are activated internally. Version 2025.1.227 introduces the `ActivateKendoScripts` method that you can use to activate the Kendo UI scripts manually. Call this method if no Telerik HtmlHelper  components are used in the View.

```
    @(Html.Kendo().ActivateKendoScripts())
```

When an ASP.NET Core MVC application uses the Telerik UI for ASP.NET Core NuGet package and initializes Kendo UI for jQuery controls, do not add `kendo-ui-license.js`, `telerik-license.js`, or `KendoLicensing.setScriptKey`. The `Telerik.Licensing` package and the `telerik-license.txt` file provide the current licensing workflow. If the application uses standalone `@progress/kendo-ui` assets instead of the Telerik UI for ASP.NET Core NuGet package, follow the [Kendo UI for jQuery license key documentation](https://docs.telerik.com/kendo-ui/intro/installation/licensing/using-license-file).

For Kendo UI for jQuery versions before `2025.1.211`, use the [legacy script license key workflow](https://docs.telerik.com/kendo-ui/intro/installation/licensing/adding-the-license-key) instead.

## License Key Updates

Always install a new license key whenever you:

* renew or purchase a new Telerik license
* Start a new trial

The new license key includes information about all previous purchases. The download and installation of a new license key is referred to as a *license key update*.

* If you used [automatic license key installation](https://www.telerik.com/aspnet-mvc/documentation/installation/activating-your-license/setting-up-your-license#automatic-installation), then open the tool that you used to download and install the license key file. You can also update the license key file by using the [manual steps above](https://www.telerik.com/aspnet-mvc/documentation/installation/activating-your-license/setting-up-your-license#manual-installation).
* If you used the [manual license key installation](https://www.telerik.com/aspnet-mvc/documentation/installation/activating-your-license/setting-up-your-license#manual-installation), then repeat the same manual steps.
* To [update your license key in CI/CD environments](https://www.telerik.com/aspnet-mvc/documentation/deployment/ci-cd-license-key), get your new license key and update the environment variable value.

## Referencing the Telerik.Licensing.Runtime.dll Assembly

The activation aproach described here is an alternative to the manual and automatic license activation explained in the sections above.

If you don't want to install the `Telerik.Licensing` NuGet package, you can activate the license by following the steps below:

1. Create an empty file named `TelerikLicense.cs` in your project's root folder.
2. Copy the Telerik UI for ASP.NET MVC key available to you on the [License Keys page](https://www.telerik.com/account/your-licenses/license-keys).
3. Paste the copied key into the `TelerikLicense.cs` you have created in step 1.
4. Go to the product's [Download Page](https://www.telerik.com/account/downloads/product-download?product=KENDOUIMVC) and download the `telerik.ui.for.aspnetmvc.[Version].commercial.zip` bundle.
5. Open the downloaded archive and navigate to the `\licensing\binaries` folder, which contains the `Telerik.Licensing.Runtime.dll` assembly.
6. Extract the `Telerik.Licensing.Runtime.dll` file, copy it to your project's `bin` folder, and then add a reference to it in Visual Studio.

## Next Steps

* [Set Up the Telerik NuGet Feed](https://www.telerik.com/aspnet-mvc/documentation/installation/installation-options/nuget-install)
* [Install License Key in CI/CD Environment](https://www.telerik.com/aspnet-mvc/documentation/deployment/ci-cd-license-key)

## See Also

* [Licensing FAQ](https://www.telerik.com/aspnet-mvc/documentation/installation/activating-your-license/licensing-faq)

* [Troubleshoot License Key Errors](https://www.telerik.com/aspnet-mvc/documentation/installation/activating-your-license/license-key-errors)

* [Get Started with Telerik UI for ASP.NET MVC](https://www.telerik.com/aspnet-mvc/documentation/getting-started-mvc/first-steps)
