ilmerge & Telerik.WinControls.RadTypeResolver.Instance.ResolveTypesInCurrentAssembly = True

4 posts, 0 answers
  1. John
    John avatar
    7 posts
    Member since:
    Sep 2012

    Posted 08 Feb 2013 Link to this post


    I have a few questions regarding ilmerge & Telerik.WinControls.RadTypeResolver.Instance.ResolveTypesInCurrentAssembly = True. Any help would be greatly appreciated.

    • My application startup object is Sub Main. Should Telerik.WinControls.RadTypeResolver.Instance.ResolveTypesInCurrentAssembly = True still be placed in the static constructor of the first form that is created and loaded?
    • My first form is a login screen that is disposed once you have successfully logged in. Will this cause issues with Telerik.WinControls.RadTypeResolver.Instance.ResolveTypesInCurrentAssembly = True?
    • I am able to successfully merging Telerik.Reporting.dll, Telerik.ReportViewer.WinForms.dll, Telerik.WinControls.dll,                 Telerik.WinControls.GridView.dll, Telerik.WinControls.RadDock.dll, Telerik.WinControls.Themes.Office2010Black.dll, Telerik.WinControls.Themes.Office2010Blue.dll, Telerik.WinControls.Themes.Office2010Silver.dll, Telerik.WinControls.UI.dll, TelerikCommon.dll and my exe both. The merged and the standalone application run without error when Telerik.WinControls.RadTypeResolver.Instance.ResolveTypesInCurrentAssembly = True. Isn’t the built executable supposed to return an exception?
  2. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 11 Feb 2013 Link to this post

    Hi John,

    Directly to your questions:

    1. Yes. You should place this setting in the static constructor of your form. As alternative you can place the code in your Main method, before creating the first form.

    2. No. It is important to set this property and disposing the form will not cause issues in this scenario.

    3. I am not sure that I understand the third question. You should set the ResolveTypesInCurrentAssembly property to true. Otherwise you may expect issues when applying different themes.

    I hope this helps. Do not hesitate to write back If you need further assistance.

    All the best,
    Jack
    the Telerik team
    Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. John
    John avatar
    7 posts
    Member since:
    Sep 2012

    Posted 11 Feb 2013 Link to this post

    Jack,

    Thanks for answering my questions. I was hoping that using the main method would be an alternative for question 1. Telerik's winforms documentation on Redistributing Telerik RadControls for WinForms states that 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. I thought this meant that the executable has to be merged to run without error. I am able to run the merged and the executable that has not been merged without error. Should I be receiving an error when attempting to run the executable that is not merged when ResolveTypesInCurrentAssembly is true?

  5. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 13 Feb 2013 Link to this post

    Hi John,

    Thank you for writing me back.

    Yes, you can set this property in your main form. However, you should do this before creating your main application form. 

    Regarding the ResolveTypesInCurrentAssembly issue, yes, you may expect to see an exception when this property is set to true and when running your application without being merged. Still there might be cases when you will not see this exception. Please note that even in this case you should do a merge.

    If you have other questions, do not hesitate to ask.

    Greetings,
    Jack
    the Telerik team
    Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
Back to Top