Reporting application doesn't work if built with ILMerge

Stimulsoft Reports.NET discussion
Post Reply
alk
Posts: 8
Joined: Wed Dec 25, 2013 8:23 am

Reporting application doesn't work if built with ILMerge

Post by alk »

I tried to build our reporting application using ILMerge utility. The assembled application doesn't work and returns null-ref exception when initializing forms. I ran through the STI sources quickly and discovered that STI visual components use hardcoded assembly name for retrieval of resources, e.g. Stimulsoft.Report, Stimulsoft.Controls etc. Evidently, this approach doesn't work in ILMerged app because assemblies are eliminated except main application exe.

To my mind, it's not the best solution forcing customers to some particular deployment scenario.

It seems that it's not a question but rather bugreport or request for change, I just haven't found any issue tracking facility where I could submit the issue.
Last edited by alk on Thu Jan 16, 2014 11:55 am, edited 1 time in total.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Reporting application doesn't work if built with ILMerge

Post by Alex K. »

Hello,

Could you explain your issue in more details?
Also can you please send us a sample project which reproduce the issue for analysis.

Thank you.
alk
Posts: 8
Joined: Wed Dec 25, 2013 8:23 am

Re: Reporting application doesn't work if built with ILMerge

Post by alk »

Hello again,

thank you for the quick reply.

There's an utility from Microsoft, ILMerge (http://research.microsoft.com/en-us/peo ... merge.aspx) what merges multiple .NET assemblies into a single assembly. As a result we obtain a single exe file instead of .exe + bunch of dlls.

I guess, the issue is reproducible with any project which uses Sti controls with resources (icons/bitmaps), i.e. StiViewerControl etc. The error happens when trying to retrieve the resource by assembly name via calling StiImageUtils.GetImage. One more note - the problem happens in case when we do not register Sti dlls in GAC, but assemble them into the resulting assembly, instead.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Reporting application doesn't work if built with ILMerge

Post by Alex K. »

Hello,

It is diffcult to say something without a sample.
Can you please send us a sample project or step by step guide how to reprodce the issue.

Thank you.
alk
Posts: 8
Joined: Wed Dec 25, 2013 8:23 am

Re: Reporting application doesn't work if built with ILMerge

Post by alk »

Well, do you have any simplest example projects, e.g. for northwind database? I could update it to reproduce the issue then.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Reporting application doesn't work if built with ILMerge

Post by Alex K. »

Hello,

You can try to reproduce on any sample from Samples in our installation pack.

Thank you.
alk
Posts: 8
Joined: Wed Dec 25, 2013 8:23 am

Re: Reporting application doesn't work if built with ILMerge

Post by alk »

Hello Aleksey,

I prepared a sample project regarding the issue. Would you like to share your e-mail to let me send the archive, because forum's mail prohibits zip attachments.
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Re: Reporting application doesn't work if built with ILMerge

Post by Andrew »

Hello,

Please send the archive to support@stimulsoft.com and refer to this forum thread.

Thank you.
Post Reply