This is a migrated thread and some comments may be shown as answers.

Deploying - doubt

17 Answers 231 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Akhil
Top achievements
Rank 1
Akhil asked on 29 Jan 2011, 07:24 AM

Hi again... :-)

I have read the FAQ : Redistributing Telerik RadControls for WinForms

But have some doubts regarding it.

There are two approaches right ? One is to make a single EXE file by merging the assemblies and the EXE of the program. And the other is to merge the assemblies into a single assembly. Am I right ?

If I want to go for the second approach, from where should I get the ILMerge program ?

Thanks in advance..

PS: Special thanks to Richard Slade for the continuous help he had provided to me. Really appreciate it... :-)

17 Answers, 1 is accepted

Sort by
0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 29 Jan 2011, 11:20 AM
Hi again,

You can download ILMerge from Microsoft here.
You might also want to check out this CodeProject.com Article on merging assemblies with ILMerge, and if you're using MSBuild or NANT for automated builds then you can find out about ILMerge Build tasks here

Hope that helps
Richard
0
Akhil
Top achievements
Rank 1
answered on 29 Jan 2011, 02:51 PM
Thanks again... :-)
0
Akhil
Top achievements
Rank 1
answered on 29 Jan 2011, 03:02 PM

I have downloaded and installed ILMerge in my PC. But didn't touched it.

I'm having another question. If I follow the second approach, ie. to merge the Telerik assemblies to a new DLL, do I have to create before starting the project (I mean before the development) or only after developing the project and when it is ready to distribute ?

If I had merged the assemblies to a new one, prior to the development of the project, and had removed all the references to the Telerik controls and added this new DLL, will I see all those controls ? I mean in the VB IDE, will I be able to use the Telerik controls just like now ? ie. I can add them from the Toolbox ?

Sorry for asking such stupid questions. Please note that, I'm just a beginner. :-)

Thanks again.

0
Richard Slade
Top achievements
Rank 2
answered on 29 Jan 2011, 03:43 PM
Hi,

Don't worry about asking questions. It's what the forums are here for,
Performing an ILMerge is really a deployment task, not one that you would do in development. So, when you are ready to deploy (to a test or production environment) then you would perform the merge, either using an automated build process or manually. Have a look at this Telerik KB article which explains in some detail about merging Telerik assemblies.

Hope that helps
Richard
0
Akhil
Top achievements
Rank 1
answered on 29 Jan 2011, 05:21 PM

Hi..

Thanks.

"Now you do not need the references to the regular Telerik assemblies (and the custom utils assemblies). You should remove them and add a reference to the merged assembly WinFormsControls.dll" - from KB

But wouldn't that show an error, when we try to remove the references or the controls from the project ? Because we have already added it to our WindowsForms !

In VB6, I have seen some exceptions, when we remove components which we are using in our forms. But haven't tested on VB.Net.

0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 29 Jan 2011, 06:07 PM
Hello,

As long as you follow the instructions in the KB article, you should have no issues with using a merged assembly as a referenced DLL in place of the Telerik ones. To show you this, I have done the following:
  • Created a project, with a RadGridView. this references 4 Telerik DLLs
  • Built and run the project.
  • Created a merged assembly of the 4 Telerik DLLs
  • Replaced the Telerik assemblies with the merged one
  • Added the RadTypeResolver lines to my code

To demonstrate, I've created a small video for you which you can watch and then replay as much as you need. You can find that here

Hope that helps but let me know if you've got further questions
Richard

0
Akhil
Top achievements
Rank 1
answered on 30 Jan 2011, 04:19 AM

Thank you... :)

Thanks for the effort you have put on creating the video too.

0
Richard Slade
Top achievements
Rank 2
answered on 30 Jan 2011, 09:52 AM
You're welcome. Glad I could help.
0
Martin
Top achievements
Rank 1
answered on 15 Oct 2013, 01:47 PM
Hello Telerik-Team,

we have a written WinForm application with Telerik controls and want to deploy it.

I've read the article 'Redistributing Telerik RadControls for WinForms' "http://www.telerik.com/help/winforms/installation-deployment-and-distribution-redestributing-telerik-radcontrols-for-windows.html"
and prefer the ILMerge methode.

Merging is successfull, and when I try to run the application on a PC without telerik installed the application runs perfectly. Also themes are working fine.

In the follwing step we want to use a dotfuscator. The fuscation is only done on the namespace of the own written code. Dotfuscation reports an eror message "Failed to resolve System.Drawing.Telerik.WinControls.Themes.Office2010Black22791407.BitmapSuffixInSameAssemblyAttribute!!!"


When I analyced the ilmerge.log I found following lines, making those strange "System.Drawing.Telerik.WinControls."-Namespace:
Merging assembly 'Telerik.WinControls.UI' into target assembly.
Duplicate type name: modifying name of the type 'System.Drawing.BitmapSuffixInSameAssemblyAttribute' (from assembly 'Telerik.WinControls.UI') to 'Telerik.WinControls.UI665635.BitmapSuffixInSameAssemblyAttribute'


So my question is: How can I avoid ILMerge to work with Telerik controls?

Would it be OK when I exclude the telerik controls into a separate dll like descriped in 'Deploying - doubt' "http://www.telerik.com/community/forums/winforms/general-discussions/deploying---doubt.aspx"?

Thank you for your anwer!
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 18 Oct 2013, 02:44 PM
Hello Martin,

Thank you for contacting Telerik Support.

I have tested deploying a simple application (with Office2010Black theme applied) using ILMerge approach. After that I used the Dotfuscator version 5.5.4521.29298. I did not encounter any difficulties. Please have a look at the attached sample video (drag and drop over the browser to play). Could you please specify what are the exact steps you perform leading to this error message? The version of the tools you use? Thank you in advance. 

Note: you may also use the Graphical interface to the Microsoft ILMerge utility to ILMerge your application.

Regards,
Desislava
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Martin
Top achievements
Rank 1
answered on 25 Oct 2013, 09:30 AM
Hello Desislava,

Thanks for reply!

Currently I didn't try out the dotfuscator as I use the Confuser from http://confuser.codeplex.com.

I've created a very simple project (one RadForm and one RadLabel in it). I did following Steps:

- I created a simple RadForm applikation on "C:\temp\SimpleTestprojekt"

- added a static Constructor to the form:
 static Form1()
        {
            Telerik.WinControls.RadTypeResolver.Instance.TypeResolverAssemblyName = "GUIControls";
            Telerik.WinControls.RadTypeResolver.Instance.ResolveTypesInCurrentAssembly = true;
        }
- compile the release --> SimpleTestprojekt.exe is created

- start the ILMerge:
"C:\Program Files (x86)\Microsoft\ILMerge\ILMerge.exe" /target:winexe /log:ILMerge.log /targetplatform:"v4, C:\Windows\Microsoft.NET\Framework\v4.0.30319" SimpleTestprojekt.exe TelerikCommon.dll Telerik.WinControls.dll Telerik.WinControls.UI.dll /out:SimpleTestprojektMerged.exe
 --> a SimpleTestprojektMerged.exe is created

- check, if SimpleTestprojektMerged.exe is runable (yes, it is)

- Start the Confuser.exe (http://confuser.codeplex.com)
  - attach SimpleTestprojektMerged.exe with Drag&Drop
  - goto tab 'Basic settings' and choose 'None' as dotfuscation level
  - goto tab 'Confuse' will start the confuscation. After a little while a System.Exception come up:
"Message : Failed to resolve System.Drawing.Telerik.WinControls.UI941086.BitmapSuffixInSameAssemblyAttribute!!!"

It's a little different message than above, but it shows, that the problem exist also with  but I think it points to the same problem ...
When I confuse the original SimpleTestprojekt.exe the confusion is working well.

Do you have any solution or idea, what I can do?


Thanks in advance
Martin
0
Richard Slade
Top achievements
Rank 2
answered on 25 Oct 2013, 10:19 AM
I saw that you are using Dotfuscator. I've found, that Deep Sea Obfuscator works really well, and is much simpler to integrate than most other obfuscators. Never had any conflicts either. 

http://www.deepseaobfuscator.com/

Richard
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 30 Oct 2013, 08:31 AM
Hello Martin,

Thank you for writing back.

I have followed the described steps and successfully reproduced the problem that you are facing. Due to our specific theme mechanism, when you try to Confuse the IL merged exe (which contains also the Telerik dlls), this results in the obtained exception. The Confuser obfuscates also our dlls and some of our theme strings are unable to be resolved.

I would recommend you to use the mentioned Dotfuscator from my previous post in order to keep these steps or to Confuse the real exe first (which contains only your code) and then to IL merge it with Telerik dlls. You can find attached a sample video (drag and drop over the browser to play) demonstrating the exact steps to follow.

Regards,
Desislava
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Martin
Top achievements
Rank 1
answered on 30 Oct 2013, 11:55 AM
Hello Desislava,

Thanks for your answer and your support! I wish, there would be a solution for my favorit obfuscator machine.

But so I'll try out the dotfuscator and also Richards DeepseaObfuscator.

Regards
Martin
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 04 Nov 2013, 11:02 AM
Hello Martin,

Thank you for contacting us again.

We aim at supporting the main obfuscators such as Dotfuscator. Richard recommended also DeepSea Obfuscator. We will consider your favorite Confuser for future support if there is demand for it. Until then I will suggest to use it as obfuscating the real exe first (which contains only your code) and then to IL merge it with Telerik dlls, hence avoid obfuscating Telerik dlls.  

I hope this information helps. Should you have further questions, I would be glad to help.

Regards,
Desislava
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Ramius
Top achievements
Rank 1
answered on 12 Jan 2014, 04:23 PM
Hello,

 The free version of Dotfuscator is not to use and the professional version has a bad pricing model. So i don't want to use Dotfuscator and expect that there are other supported Dotfuscators. 

I also would like to use Confuser as Dotfuscator for my products.

Kind Regards,

Ramius
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 15 Jan 2014, 07:05 AM
Hello Ramius,

Thank you for contacting Telerik Support.

We really appreciate your feedback. For the time being, you can use the Confuser, but it is necessary to confuse your application executable and assemblies (which contains only your code) and then to IL merge them with with Telerik dlls (which are not confused). A sample video of the recommended approach is provided in my previous post from Oct, 30.

I hope this information helps. Should you have further questions, I would be glad to help.

Regards,
Desislava
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
General Discussions
Asked by
Akhil
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Akhil
Top achievements
Rank 1
Martin
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Ramius
Top achievements
Rank 1
Share this question
or