Deploying - doubt

18 posts, 2 answers
  1. Akhil
    Akhil avatar
    38 posts
    Member since:
    Jul 2010

    Posted 29 Jan 2011 Link to this post

    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... :-)

  2. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 29 Jan 2011 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Akhil
    Akhil avatar
    38 posts
    Member since:
    Jul 2010

    Posted 29 Jan 2011 Link to this post

    Thanks again... :-)
  5. Akhil
    Akhil avatar
    38 posts
    Member since:
    Jul 2010

    Posted 29 Jan 2011 Link to this post

    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.

  6. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 29 Jan 2011 Link to this post

    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
  7. Akhil
    Akhil avatar
    38 posts
    Member since:
    Jul 2010

    Posted 29 Jan 2011 Link to this post

    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.

  8. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 29 Jan 2011 Link to this post

    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

  9. Akhil
    Akhil avatar
    38 posts
    Member since:
    Jul 2010

    Posted 29 Jan 2011 Link to this post

    Thank you... :)

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

  10. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 30 Jan 2011 Link to this post

    You're welcome. Glad I could help.
  11. Martin
    Martin avatar
    4 posts
    Member since:
    Oct 2013

    Posted 15 Oct 2013 Link to this post

    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!
  12. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 18 Oct 2013 Link to this post

    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 >>
  13. Martin
    Martin avatar
    4 posts
    Member since:
    Oct 2013

    Posted 25 Oct 2013 Link to this post

    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
  14. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 25 Oct 2013 Link to this post

    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
  15. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 30 Oct 2013 Link to this post

    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 >>
  16. Martin
    Martin avatar
    4 posts
    Member since:
    Oct 2013

    Posted 30 Oct 2013 Link to this post

    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
  17. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 04 Nov 2013 Link to this post

    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 >>
  18. Ramius
    Ramius avatar
    127 posts
    Member since:
    Feb 2008

    Posted 12 Jan 2014 Link to this post

    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
  19. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 15 Jan 2014 Link to this post

    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 >>
Back to Top
UI for WinForms is Visual Studio 2017 Ready