This article explains how to upgrade the version of the Telerik® UI for ASP.NET AJAX control and how to switch from a Trial to a Developer license.
You can find concrete information about your case in the distinct sections of this article:
To upgrade the Telerik controls, you only need to replace the Telerik assemblies project references with their newer versions and update their references. The instructions below assume you have already installed the new version.
Before starting an upgrade of your project, you may find it useful to review the following resources:
The Known Issues and Important Changes sticky thread. It lists changes that may affect your code and known regression issues (that are usually fixed in the subsequent release). Review the information for the releases you go through so you can evaluate whether you will be affected by anything.
The Telerik Upgrade API Analyzer can analyze your C# code to notify you of changes between your version and the new version you want to upgrade to. It offers information as of the Q1 2012 (2012.1.225) release.
UI for ASP.NET AJAX Release History—reviewing the release notes for all releases you go through will let you see what has changed, what fixes, features and controls have been implemented so you are better prepared to meet your project's challenges.
There are two ways to perform an upgrade:
You can utilize the AJAX VS Extensions wizards:
You simply need to replace the assembly references with the new ones. Here is a list of steps that ensures a safe upgrade:
Backup your project (a simple copy to another folder is usually enough, and using a source control system makes this redundant).
Delete the old Telerik.Web.UI.* references from the project and close it. This includes the Skins and Design assemblies.
Open the Bin folder of your project in Windows Explorer and delete the old Telerik.Web.UI.* assemblies.
Copy the new assemblies from the new installation's Bin40 folder (for .NET 4.0; for .NET 3.5 you need Bin35; for .NET 4.5 you need Bin45). If you are using a hotfix, go to the folder where you unzipped it.
Paste the new assemblies in the Bin folder of your project in Windows Explorer.
Add references to the Telerik assemblies in the project in Visual Studio.
Make sure you have all the necessary web.config registrations
As with any ASP.NET Project, it is often helpful to clear the ASP Temporary files and the browser cache.
In the same manner (copy and replace), you may also want to upgrade any other assemblies you are using, as well as localization files (~/App_GlobalResources), dialogs (RadImageEditor, RadEditor), TypeScript definitions, etc. Make sure to save any modifications you have beforehand to avoid losing your work.
The difference between the trial and licensed version of the Telerik controls is built into the assemblies themselves. You do not need license keys or activations.
Once you have a licensed package, simply follow the steps from the Upgrade to a Newer Version of Telerik® UI for ASP.NET AJAX section to delete the trial assemblies and replace them with the developer versions.
You should delete (uninstall) the Trial version from your machine before upgrading to the licensed ones. Doing so eliminates the chance of trial assemblies still making it into the project references or even production.
When referencing assemblies from the GAC, the way those references are added to VS and the way the assemblies are placed in the GAC are slightly different than the common BIN-deployment scenario. For example, you will need to add the Telerik assemblies to the GAC manually and use fully qualified assembly names in the handler registrations in the web.config. You can read more about handling assemblies in the GAC and their references in the Using the Global Assembly Cache help article.
Sometimes the .NET Framework caches the old Telerik.Web.UI.dll and therefore the update may seem to have failed. Try the following to ensure that no caches remain:
Terminate the IIS process (from the Windows Task Manager) and close Visual Studio.
Clean up the Temporary ASP.NET Files from
<sysdrive>:\Windows\Microsoft.NET\Framework\<vernum>\Temporary ASP.NET Files.
Delete your browser cache. For example, these are the steps for IE: Tools -> Internet Options -> Delete Files.
Clean up the Windows WebSite Cache from `
:\Users<UserName>\AppData\Local\Microsoft\WebsiteCache. The location of this cache may vary from one operating system to the next.
Clean up the Visual Studio Backup from
<sysdrive>:\Users\<UserName>\Documents\Visual Studio <vsVersion>\Backup Files. This location depends on your VS settings and installation.
Clean up the Project Assemblies cache from
<sysdrive>:\Users\<UserName>\AppData\Local\Microsoft\Visual Studio\<vsVersion>\ProjectAssemblies. The location of this cache may vary from one operating system to the next.
The copyright message appears only when the Web Application/Web Site uses the trial version of Telerik.Web.UI.dll:
Thank you for using the Trial Version of Telerik® UI for ASP.NET AJAX to build more powerful applications faster. Purchase the Commercial Version now to get access to all product updates and the Telerik expert support.
The Developer versions of the Telerik controls do not throw copyright messages.
To remove the copyright message
Make sure you have downloaded the proper, Developer "DLL and Scripts only" file from your account. You will recognize it by the Dev abbreviation in the file name (see Figure 1-2).
Upgrade your project manually to ensure the correct assemblies are referenced.
You can see how the file information of a trial version of the Telerik.Web.UI.dll assembly in Figure 1. Alternatively, you can see the same information by double-clicking the assembly in Visual Studio and exploring its properties as shown in Figure 2.
If your project runs on .NET 4.0, you may get an error similar to the following:
The primary reference "Telerik.Web.UI, Version=2015.3.930.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the assembly "Newtonsoft.Json, Version=18.104.22.168, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed" which was built against the ".NETFramework,Version=v4.5" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.0".
The issue is caused by the Microsoft Windows Azure .NET SDK as explained by Damien White in his DLL Hell Strikes Again blog post:
The root cause is with Azure SDK 2.3. The SDK install drops a .NET 4.5-targeted Newtonsoft.Json.dll in the C:\Program Files\Microsoft SDKs\Windows Azure.NET SDK\v2.3\ref folder. Unfortunately, this folder is registered as a global reference folder even for frameworks prior to .NET 4.5.
There are several ways to fix the issue:
If possible for your project, upgrade to .NET 4.5.
Uninstall the Microsoft Windows Azure .NET SDK if you do not need it.
Include a NuGet package for the Newtonsoft.Json assembly in your project with the proper version so a local reference is used.
Remove the Newtonsoft.Json.dll file from the
Program Files\Microsoft SDKs\Windows Azure.NET SDK\v2.3\ref\folder as suggested in the workarounds in this item on Microsoft Connect.
According to client reports, in some cases cleaning the ASP.NET Temporary Files and the .NET temporary files resolves the problem as well.
You can add a
bindingRedirectelement to your
web.configfile and use the version you need:
<dependentAssembly> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" /> <bindingRedirect oldVersion="22.214.171.124-126.96.36.199" newVersion="188.8.131.52" /> </dependentAssembly>
If a binding redirect does not work (e.g., in a build environment), the following approach has been reported by clients to resolve the problem, as seen on the Could not load file or assembly… NuGet Assembly Redirects blog post:
From any .config file, remove the
<assemblyBinding>element and its child elements. In other words—strip your app from assembly binding redirects.
Open the Package Manager Console in Visual Studio. This can be done from the View > Other Windows > Package Manager Console.
Execute the following command:
Get-Project -All | Add-BindingRedirect
The most common error looks like this:
Could not load file or assembly 'Telerik.Web.UI, Version=2013.1.417.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Could not load file or assembly 'Telerik.Web.UI, Version=2013.1.417.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
where the Version value is usually the old version you are upgrading from.
Below you can find information on dealing with both errors.
The located assembly's manifest definition does not match the assembly reference HRESULT: 0x80131040
The HRESULT: 0x80131040 error means that the reference to the Telerik.Web.UI assembly is wrong in the project. Here are several common reasons for this problem and their solutions:
The reference in the Visual Studio project itself points to the old version (e.g., to the installation folder). To resolve this, update the project references to point to the BIN and ensure the correct assemblies are there.
There is a
Registerdirective with a fully qualified assembly name somewhere in your project that points to an old version (e.g., on a master page, or a user control, or in the web.config). There are several ways to fix it:
The best resolution is to find and remove the old version reference. It is best to avoid fully qualified assembly names as this facilitates future upgrades. Usually, a
Registerdirective should look like this:
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
Registerdirective to match the current version. You will have to repeat this process every time you upgrade.
bindingRedirectelement in your web.config to point all references to the new version. You will need to update it every time you upgrade.
<configuration> <runtime> <dependentAssembly> <assemblyIdentity name="Telerik.Web.UI" publicKeyToken="121fae78165ba3d4" /> <bindingRedirect oldVersion="184.108.40.206-2015.3.900.40" newVersion="2015.3.930.40" /> </dependentAssembly> </runtime> </configuration>
There is an explicit reference to a concrete Telerik controls version in another project (e.g., a data access layer, a second web app in the current solution, some custom class or custom controls assembly). In these cases you will need to find the reference and update it.
Operation is not supported HRESULT: 0x80131515
The HRESULT: 0x80131515 error usually means that the file was downloaded from the Internet and Windows has blocked it. In such cases you need to simply do the following:
- In Windows Explorer, right-click the file.
- Select Properties
- Click the Unblock button.
- Clear the read-only attribute.