Edit this page

Redistributing Telerik UI for for WinForms

The Telerik UI for for WinForms suite includes a limited run time royalty-free license to redistribute the controls in your own solutions subject to the License Agreement. You can use the components in the suite to build your own solutions, and redistribute your solutions to and your end users who are not required to purchase a license from Telerik to access your solution.

Examples of Permitted Uses

  • Windows Forms applications for internal company use.

  • Commercial WinForms applications deployed to Your end users. In this case, you may deploy the Telerik assemblies together with your application with the sole exception of the Telerik.WinControls.UI.Design.dll assembly. The Telerik.WinControls.UI.Design.dll assembly may not be deployed to end-users under any circumstance.

  • WinForms applications that offer a trial or free version of Your application. If offering a free or trial version of Your Integrated Product, redistribution of the assemblies is not permitted. You are required to protect all Telerik assemblies by using one of the methods below (ILMerge to merge the Telerik WinForms assemblies with the executable file (this does not apply to the Document processing assemblies, see below) of your application OR build the Telerik.WinControls.dll assembly from source code using one of the approaches described below)

Examples of Uses that Require Discussion

  • Products that expose the design-time functionality of the Telerik RadControls or the VisualStyleBuilder.

  • Products that do not add significant functionality to the Telerik RadControls.

  • Open source products.

For additional usage requirements, development restrictions and, defined term definitions, please refer to the WinForms license agreement. For uses that require additional review, please send e-mail to sales@telerik.com to discuss your planned use of the controls.

ILMerge Telerik WinForms assemblies

RELATED VIDEOS
ILMerge
This video demonstrates how to merge your application exe with the Telerik assemblies, so they cannot be reused. (Runtime: 1:57)
overview-video 001

When you deploy your application, you may prefer to do it as a single executable rather than an executable referencing many external assemblies. In this case, you need to ILMerge the assemblies with the executable. Here is a link to MSDN from where you can download the ILMerge executable: Download ILMerge

In order to use this approach you need to set the ResolverTypesInCurrentAssembly property to true in the static constructor of the first form that is created and loaded when your application starts:

Please make sure that you set the ResolverTypesInCurrentAssembly property in the static constructor of the form. This approach will not work if the property is set somewhere else.

static RedestributingTelerikRadControls()
{
    Telerik.WinControls.RadTypeResolver.Instance.ResolveTypesInCurrentAssembly = true;
}
public RedestributingTelerikRadControls()
{
    InitializeComponent();
}

Shared Sub New()
    Telerik.WinControls.RadTypeResolver.Instance.ResolveTypesInCurrentAssembly = True
End Sub
Public Sub New()
    ' This call is required by the designer.
    InitializeComponent()
    ' Add any initialization after the InitializeComponent() call.
End Sub

Next, you should build your solution and then ILMerge the built application executable with the Telerik assemblies:

If you try to run your solution (not just build it, but run the built executable) when the ResolveTypesInCurrentAssembly is true, you will get an exception since the application executable is still not merged with the Telerik assemblies. Make sure that the application executable is ILMerged with the Telerik assemblies when the ResolveTypesInCurrentAssembly is true and the executable is run.

  1. Press the Start button and choose Run.

  2. Type "cmd" (without the quotes).

  3. In the command prompt navigate to the ILMerge tool directory. Usually, the directory is C:\Program Files\Microsoft\ILMerge, although this directory may vary depending on the Operation System version.

  4. ILMerge the assemblies using the following command in the command prompt: 

Note: This commands will work in case the application executable and the Telerik assemblies are contained in the ILMerge tool folder. In any other case, you will need to include the full path to the assemblies/executables. In addition, the Telerik assemblies that should be given as parameters, should be those referenced by your application.

ilmerge /target:winexe /out:MergedApplicationExecutable.exe ApplicationExecutable.exe TelerikCommon.dll Telerik.WinControls.UI.dll Telerik.WinControls.dll

If the referenced assemblies are .NET 4.0 assemblies, you need to specify the targetplatform also:

ILMerge.exe /target:winexe /targetplatform:"v4, C:\Windows\Microsoft.NET\Framework\v4.0.30319"/out:MergedApplicationExecutable.exe AppliocationExecutable.exe Telerik.WinControls.dll Telerik.WinControls.UI.dll TelerikCommon.dll

The MergedApplicationExecutable.exe is now a stand-alone application executable that does not need any additional references to the Telerik assemblies.

Building the Telerik Assemblies from Source Code - Using the OemAssemblyName

RELATED VIDEOS
Redistribute OEM
This video demonstrates how to build the Telerik assemblies, so they are locked to your application and cannot be reused outside of it. (Runtime: 5:49)
overview-video 001

This method requires modifications to the source files, which are distributed as part of the Subscription license. If you have purchased a Subscription license for Telerik UI for for WinForms, and would like to explore this method, the following information will allow you to do so.

Protecting Telerik UI for for WinForms requires the Telerik assemblies to be built from source code. The essential part of this approach is that you need to introduce a small modification to the Telerik.WinControls project. For brevity this document assumes that the source distribution ZIP file is extracted in C:\Telerik UI for for WinForms Source:

  1. Open the following solution file: C:\Telerik UI for for WinForms Source\RadControlsVS2010.sln

  2. In the properties for the Telerik.WinControls project, open the Build tab and add an OEM conditional compilation symbol, as shown below:

    Before:

    installation-deployment-and-distribution-redestributing-telerik-radcontrols-for-windows 001

    After:

    installation-deployment-and-distribution-redestributing-telerik-radcontrols-for-windows 002

    Note: If you are building the .NET4.0 version of the assemblies, you need to use the Release40 build configuration. In this case, when you add the "OEM" symbol, you need to keep the existing NET4 symbol - "OEM; NET4".

  3. Open C:\Telerik UI for for WinForms Source\RadControl\TPF\Control\RadControl.cs in a text editor (notepad, Visual Studio etc).

  4. Uncomment the following line and change the string to you application’s assembly name:

    Before:

    installation-deployment-and-distribution-redestributing-telerik-radcontrols-for-windows 003

    After:

    installation-deployment-and-distribution-redestributing-telerik-radcontrols-for-windows 004

  5. Save RadControl.cs and rebuild the solution.

  6. In your application replace the existing references to Telerik UI for for WinForms assemblies with the ones built from source code and rebuild your project so it will use the newly build assemblies.

Once you finish these steps, and if you or someone else tries to use that assembly from another application the evaluation dialog will appear (randomly).

installation-deployment-and-distribution-redestributing-telerik-radcontrols-for-windows 005

Building the Telerik assemblies from Source Code - Using the OemPublicKeyToken

RELATED VIDEOS
Redistribute OEMKEY
This video demonstrates how to build the Telerik assemblies, so they are locked to your application public token key and cannot be reused outside of it. (Runtime: 7:19)
overview-video 001

This section demonstrates how to deploy a project with a public token key. We will assume that you have downloaded and extracted your source code distribution in C:\Telerik UI for for WinForms Source\RadControlsVS2010.sln:

  1. Open the following solution file: C:\Telerik UI for for WinForms Source\RadControlsVS2010.sln

  2. In the properties for the Telerik.WinControls project, open the Build tab and add an OEMKEY conditional compilation symbol, as shown below:

    Before:

    installation-deployment-and-distribution-redestributing-telerik-radcontrols-for-windows 006

    After:
    installation-deployment-and-distribution-redestributing-telerik-radcontrols-for-windows 007

  3. Open C:\Telerik UI for for WinForms Source\RadControl\TPF\Control\ RadControl.cs in a text editor (notepad, Visual Studio etc).

  4. Delete the value of the OemPublicKeyToken:

    Before:
    installation-deployment-and-distribution-redestributing-telerik-radcontrols-for-windows 008
    After:

    installation-deployment-and-distribution-redestributing-telerik-radcontrols-for-windows 009

  5. Open your project and go to Properties, then select the Signing tab.

  6. Mark Sign the Assembly checkbox and create a new strong name key.installation-deployment-and-distribution-redestributing-telerik-radcontrols-for-windows 010

  7. Build your project and copy the route to your executable file.

  8. Open the Developer Command Prompt for your version of Visual Studio.
    installation-deployment-and-distribution-redestributing-telerik-radcontrols-for-windows 011

  9. Execute the following command with a parameter the route to your assembly.
    installation-deployment-and-distribution-redestributing-telerik-radcontrols-for-windows 012

  10. Copy the generated public key token.
    installation-deployment-and-distribution-redestributing-telerik-radcontrols-for-windows 013

  11. Return to the RadControlsVS2010 solution, open the RadControl.cs file and set the OemPublicKeyToken to equal the value of the newly generated key token.
    installation-deployment-and-distribution-redestributing-telerik-radcontrols-for-windows 014

  12. Build the solution.

  13. In your application replace the existing references to Telerik UI for for WinForms assemblies with the ones built from source code and rebuild your project so it will use the newly build assemblies.

Using the Telerik Document Processing Libraries in Your Solutions

In order to include the Telerik Document Processing libraries in your application, you should build the source code as described below. The source code of the Document Processing libraries is distributed together with the Telerik UI for for WinForms source code and installation and is available for downloading from the client accounts. For brevity this document assumes that the source distribution ZIP file is extracted in C:\WinFormsDPLSource

Instructions

1. Open C:\WinFormsDPLSource\Documents\Core\Core\Licensing\AssemblyProtection.cs in a text editor (notepad, Visual Studio, etc.)

2. Uncomment the following line:

Before:

public static bool IsValid()
{
    // Uncomment the following line
    // return ValidatePassPhrase();
    return true;
}

Public Shared Function IsValid() As Boolean
    ' Uncomment the following line
    ' return ValidatePassPhrase();
    Return True
End Function

After:

public static bool IsValid()
{
    // Uncomment the following line
    return ValidatePassPhrase();
}

Public Shared Function IsValid() As Boolean
    ' Uncomment the following line
    Return ValidatePassPhrase()
End Function

3. Change the ApplicationName constant to match the name of your application:

Before:

internal const string ApplicationName = "MyApp";

Friend Const ApplicationName As String = "MyApp"

After:

internal const string ApplicationName = "Sample Application Name v2.0 (tm)";

Friend Const ApplicationName As String = "Sample Application Name v2.0 (tm)"

4. Save AssemblyProtection.cs and rebuild.

5. In your application replace the existing references to the Telerik assemblies with the ones built from the source code.

6. If you run the application now you should get an exception with message “This version of Telerik UI for for WinForms is licensed only for use by Sample Application Name v2.0 (tm)”. Note that “Sample Application Name v2.0 (tm)” will be replaced with the value of the ApplicationName constant.

Using the Images from the Suite in Your Solutions

When you install the suite together with the installation we deploy a few different kinds of images - some come with the controls, others with the examples, with themes, etc. Following you can find information on which images can be reused in your applications and how this can be done.

  • Images displayed in the examples may not be used/reused at all by our Licensees.

  • Images and other resources provided in the core product may not be used outside of the Telerik components.

  • Images from one Telerik control can be reused in another Telerik control as long as the customer has obtained licenses for both Telerik products.

Telerik UI for for WinForms Assemblies

When deploying your application on customer machines, you should make sure that the following assemblies are included in the distribution, being merged with the application executable or being recompiled with the special symbol set:

Assemblies that you should redistribute in all scenarios:

  • TelerikCommon.dll

  • Telerik.WinControls.dll

Assemblies that you need to redistribute depending on which controls you use in your application

Control Name Assembly
CustomShape Telerik.WinControls.dll
RadApplicationMenu Telerik.WinControls.UI.dll
RadBreadCrumb Telerik.WinControls.UI.dll
RadBulletGraph Telerik.WinControls.UI.dll
RadButton Telerik.WinControls.UI.dll
RadCalendar Telerik.WinControls.UI.dll
RadCarousel Telerik.WinControls.UI.dll
RadCheckBox Telerik.WinControls.UI.dll
RadCheckedListBox Telerik.WinControls.UI.dll
RadColorDialog Telerik.WinControls.dll
RadContextMenu Telerik.WinControls.UI.dll
RadContextMenuManager Telerik.WinControls.UI.dll
RadChart Telerik.WinControls.RadChart.dll
RadDataFilter Telerik.WinControls.UI.dll
RadDateTimePicker Telerik.WinControls.UI.dll
RadDiagram Telerik.WinControls.RadDiagram.dll
RadDock Telerik.WinControls.RadDock.dll
RadDropDownButton Telerik.WinControls.UI.dll
RadForm Telerik.WinControls.UI.dll
RadGridView Telerik.WinControls.GridView.dll
RadHScrollBar Telerik.WinControls.UI.dll
RadLabel Telerik.WinControls.UI.dll
RadLinearGauge Telerik.WinControls.UI.dll
RadMaskedEditBox Telerik.WinControls.UI.dll
RadMenu Telerik.WinControls.UI.dll
RadMultiColumnComboBox Telerik.WinControls.GridView.dll
RadProgressBar Telerik.WinControls.UI.dll
RadRadioButton Telerik.WinControls.UI.dll
RadRepeatButton Telerik.WinControls.UI.dll
RadRibbonBar Telerik.WinControls.UI.dll
RadRibbonForm Telerik.WinControls.UI.dll
RadRotator Telerik.WinControls.UI.dll
RadScheduler Telerik.WinControls.Scheduler.dll
RadSpinEditor Telerik.WinControls.UI.dll
RadSplitButton Telerik.WinControls.UI.dll
RadStatusStrip Telerik.WinControls.UI.dll
RadTextBox Telerik.WinControls.UI.dll
RadThemeManager Telerik.WinControls.dll
RadTitleBar Telerik.WinControls.UI.dll
RadToggleButton Telerik.WinControls.UI.dll
RadTrackBar Telerik.WinControls.UI.dll
RadVScrollBar Telerik.WinControls.UI.dll
RadWaitingBar Telerik.WinControls.UI.dll
RadRating Telerik.WinControls.UI.dll
ShapedForm Telerik.WinControls.UI.dll
SchedulerBindingDataSource Telerik.WinControls.Scheduler.dll
RadShortcuts Telerik.WinControls.dll
AquaTheme Telerik.WinControls.Themes.Aqua.dll
DesertTheme Telerik.WinControls.Themes.Desert.dll
Office2007Black Telerik.WinControls.Themes.Office2007Black.dll
Office2007Silver Telerik.WinControls.Themes.Office2007Silver.dll
TelerikMetroTheme Telerik.WinControls.Themes.TelerikMetro.dll
BreezeTheme Telerik.WinControls.Themes.Breeze.dll
HighContrastBlackTheme Telerik.WinControls.Themes.HighContrastBlack.dll
Office2010Black Telerik.WinControls.Themes.Office2010BlackTheme.dll
Office2010Blue Telerik.WinControls.Themes.Office2010BlueTheme.dll
Office2010Silver Telerik.WinControls.Themes.Office2010SilverTheme.dll
Office2010Black Telerik.WinControls.Themes.Office2010BlackTheme.dll
Windows7 Telerik.WinControls.Themes.Windows7.dll
RadMarkupDialog Telerik.WinControls.UI.RadMarkupDialog.dll
RadDropDownList Telerik.WinControls.UI.dll
RadListControl Telerik.WinControls.UI.dll
RadListView Telerik.WinControls.UI.dll
RadTreeView Telerik.WinControls.UI.dll
RadDesktopAlert Telerik.WinControls.UI.dll
RadSeparator Telerik.WinControls.UI.dll
RadWizard Telerik.WinControls.UI.dll
RadPageView Telerik.WinControls.UI.dll
RadSplitContainer Telerik.WinControls.UI.dll
RadGroupBox Telerik.WinControls.UI.dll
RadPanel Telerik.WinControls.UI.dll
RadScrollablePanel Telerik.WinControls.UI.dll
RadRichTextBox Telerik.WinControls.RichTextBox.dll
RadRichTextEditor Telerik.WinControls.RichTextEditor.dll
RadSpellChecker Telerik.WinControls.SpellChecker.dll
RadPropertyGrid Telerik.WinControls.UI.dll
RadRangeSelector Telerik.WinControls.UI.dll
RadReminder Telerik.WinControls.Scheduler.dll
RadSchedulerReminder Telerik.WinControls.Scheduler.dll
RadSchedulerNavigator Telerik.WinControls.Scheduler.dll
RadCommandBar Telerik.WinControls.UI.dll
RadMessageBox Telerik.WinControls.UI.dll
RadAutoCompleteBox Telerik.WinControls.UI.dll
RadTextBoxControl Telerik.WinControls.UI.dll
RadChartView Telerik.WinControls.ChartView.dll
RadPivotGrid Telerik.WinControls.RadPivotGrid.dll
RadFieldList Telerik.WinControls.RadPivotGrid.dll
RadPdfViewer Telerik.WinControls.PdfViewer.dll
RadGanttView Telerik.WinControls.UI.dll
RadBindingNavigator Telerik.WinControls.UI.dll
RadCollapsiblePanel Telerik.WinControls.UI.dll
RadDataEntry Telerik.WinControls.UI.dll
RadRadialGauge Telerik.WinControls.UI.dll
RadCheckedDropDownList Telerik.WinControls.UI.dll
Office2013Dark Telerik.WinControls.Themes.Office2013Dark.dll
Office2013Light Telerik.WinControls.Themes.Office2013Light.dll
TelerikMetroBlue Telerik.WinControls.Themes.TelerikMetroBlue.dll
TelerikMetroTouch Telerik.WinControls.Themes.TelerikMetroTouch.dll
Material Telerik.WinControls.Themes.Material.dll
MaterialPink Telerik.WinControls.Themes.MaterialPink.dll
MaterialTeal Telerik.WinControls.Themes.MaterialTeal.dll
MaterialBlueGray Telerik.WinControls.Themes.MaterialBlueGray.dll
VisualStudio2012Dark Telerik.WinControls.Themes.VisualStudio2012Dark.dll
VisualStudio2012Light Telerik.WinControls.Themes.VisualStudio2012Light.dll
Windows8 Telerik.WinControls.Themes.Windows8.dll
RadToggleSwitch Telerik.WinControls.UI.dll
RadLayoutControl Telerik.WinControls.UI.dll
RadPopupEditor Telerik.WinControls.UI.dll
RadDataLayout Telerik.WinControls.UI.dll
RadVirtualGrid Telerik.WinControls.GridView.dll
RadPanorama Telerik.WinControls.UI.dll
RadBrowseEditor Telerik.WinControls.UI.dll
RadCalculatorDropDown Telerik.WinControls.UI.dll
RadColorBox Telerik.WinControls.UI.dll
RadTimePicker Telerik.WinControls.UI.dll
RadClock Telerik.WinControls.UI.dll
RadPdfViewerNavigator Telerik.WinControls.PdfViewer.dll
RadCardView Telerik.WinControls.UI.dll
RadMap Telerik.WinControls.RadMap.dll
RadSpreadsheet Telerik.WinControls.RadSpreadsheet.dll

You can find all these assemblies in the /bin folder of your installation.