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

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

3 Answers 99 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 08 Feb 2013, 04:50 PM

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?

3 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 11 Feb 2013, 11:11 AM
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.
0
John
Top achievements
Rank 1
answered on 11 Feb 2013, 02:30 PM
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?

0
Jack
Telerik team
answered on 13 Feb 2013, 08:19 AM
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.
Tags
General Discussions
Asked by
John
Top achievements
Rank 1
Answers by
Jack
Telerik team
John
Top achievements
Rank 1
Share this question
or