Redistributing Telerik UI for WinForms
The Telerik UI 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 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) |
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.
Press the Start button and choose Run.
Type "cmd" (without the quotes).
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.
ILMerge the assemblies using the following command in the command prompt:
: 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
In case you encounter an error for duplicated types, please use the /allowDup flag:
ILMerge.exe /target:winexe /targetplatform:"v4, C:\Windows\Microsoft.NET\Framework\v4.0.30319" /out:MergedApplicationExecutable.exe /allowDup 1469949TestILMerge.exe Telerik.WinControls.dll Telerik.WinControls.UI.dll TelerikCommon.dll Telerik.WinControls.SpellChecker.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) |
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 WinForms, and would like to explore this method, the following information will allow you to do so.
Protecting Telerik UI 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 WinForms Source:
Open the following solution file: C:\Telerik UI for WinForms Source\RadControlsVS2010.sln
-
In the properties for the Telerik.WinControls project, open the Build tab and add an OEM conditional compilation symbol, as shown below:
Before:
After:
: 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".
Open C:\Telerik UI for WinForms Source\RadControl\TPF\Control\RadControl.cs in a text editor (notepad, Visual Studio etc).
-
Uncomment the following line and change the string to you application’s assembly name:
Before:
After:
Save RadControl.cs and rebuild the solution.
In your application replace the existing references to Telerik UI 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).
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) |
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 WinForms Source\RadControlsVS2010.sln:
Open the following solution file: C:\Telerik UI for WinForms Source\RadControlsVS2010.sln
-
In the properties for the Telerik.WinControls project, open the Build tab and add an OEMKEY conditional compilation symbol, as shown below:
Before:
After:
Open C:\Telerik UI for WinForms Source\RadControl\TPF\Control\ RadControl.cs in a text editor (notepad, Visual Studio etc).
-
Delete the value of the OemPublicKeyToken:
Before: After:
Open your project and go to Properties, then select the Signing tab.
Mark Sign the Assembly checkbox and create a new strong name key.
Build your project and copy the route to your executable file.
Open the Developer Command Prompt for your version of Visual Studio.
Execute the following command with a parameter the route to your assembly.
Copy the generated public key token.
Return to the RadControlsVS2010 solution, open the RadControl.cs file and set the OemPublicKeyToken to equal the value of the newly generated key token.
Build the solution.
In your application replace the existing references to Telerik UI 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 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:\DPL.
Instructions
1. Open C:\DPL\Documents\Licensing\AssemblyProtection.cs
in a text editor (notepad, Visual Studio, etc.). In versions of the suite prior to R2 2016, the path is C:\DPL\Documents\Core\Core\Licensing\AssemblyProtection.cs
.
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 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 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 |
RadBarcode | Telerik.WinControls.UI.dll |
RadBreadCrumb | Telerik.WinControls.UI.dll |
RadBulletGraph | Telerik.WinControls.UI.dll |
RadButton | Telerik.WinControls.UI.dll |
RadButtonTextBox | 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 |
RadFontDropDownList | 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 |
RadTabbedForm | 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 |
FluentTheme | Telerik.WinControls.Themes.Fluent.dll |
FluentDarkTheme | Telerik.WinControls.Themes.FluentDark.dll |
CrystalTheme | Telerik.WinControls.Themes.Crystal.dll |
CrystalDarkTheme | Telerik.WinControls.Themes.CrystalDark.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 |
RadTimeSpanPicker | Telerik.WinControls.UI.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 |
RadDomainUpDown | Telerik.WinControls.UI.dll |
ExplorerControl | Telerik.WinControls.UI.dll |
RadOpenFileDialog | Telerik.WinControls.UI.dll |
RadOpenFolderDialog | Telerik.WinControls.UI.dll |
RadSaveFileDialog | Telerik.WinControls.UI.dll |
RadWebCam | Telerik.WinControls.RadWebCam.dll |
RadSparkline | Telerik.WinControls.UI.dll |
RadVirtualKeyboard | Telerik.WinControls.UI.dll |
RadSyntaxEditor | Telerik.WinControls.SyntaxEditor.dll |
You can find all these assemblies in the /bin folder of your installation.