Hi,
I have a project using the XtraGrid and need the export functionality. I've learned, that I need to manually add some references to my project in order to get that working on client machines.
However, I'm now in the process to create a single executable with all depending assemblies embedded using the red-gate tool SmartAssembly. Everything is working fine, except for the export functionality. The smartassembly tool scans for dependencies and as I've also experienced problems with setup-projects, smartassembly doesn't recognize all the dependencies. Now for the setup tools, the workaround was easy by just copying the assemblies to the installation directory. Unfortunately, smartassembly doesn't allow to manually add assemblies to embed.
I've tried to explicitly access some classes from the referenced assemblies to "trick" .NET into believing it is dependent on them. For some of the missing assemblies this worked fine (XtraTreeList, and XtraBars) but two of them are always ignored: XtraRichEdit and XtraPrinting
I'm doing something like this in my application:
var bmo = new DevExpress.XtraRichEdit.BookmarkOptions(); bmo.Color = Color.Aqua;
var options = new DevExpress.XtraPrinting.ExportOptions(); options.Html.Title = "some text";
var bbi = new DevExpress.XtraBars.BarButtonItem(); bbi.Description = "some text";
var fi = new DevExpress.XtraTreeList.FooterItem();
I was hoping that this is causing a proper dependency recognition on all assemblies, but it isn't - at least not for two of them.
Is there anything I can do to make that happen?
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hi ,
Thank you for your report.
We need more time to investigate this issue. Please bear with us.
Thanks,
Elliot
Hi Stefan,
Please accept my sincere apologies for the delay in responding.
I have discussed this issue with our developers and we came to conclusion that you should call some method from the DevExpress.XtraRichEdit.v10.2.dll assembly and DevExpress.XtraPrinting.v10.2.dll assembly to generate references.
Thanks,
Elliot
I've updated my code to this:
var bmo = new DevExpress.XtraRichEdit.BookmarkOptions(); bmo.Color = Color.Aqua;
bmo.Reset();
var options = new DevExpress.XtraPrinting.ExportOptions(); options.Html.Title = "some text";
options.ToString();
var bbi = new DevExpress.XtraBars.BarButtonItem(); bbi.Description = "some text";
var fi = new DevExpress.XtraTreeList.FooterItem();
still doesn't recognize the dependencies.
Hi Stefan,
Thank you for your reply.
Please check that you use the methods from DevExpress.XtraRichEdit.v10.2.dll assembly and DevExpress.XtraPrinting.v10.2.dll assembly to generate references. It seems that you use methods from other assemblies.
Thanks,
Elliot
I think I did use methods from those assemblies. If not, it might help if you could providing some sample code for me.
Thanks
Hi Stefan,
We need more time to investigate this issue. Please bear with us.
Thanks,
Elliot
Hi Stefan,
Please accept my sincere apologies for the delay in responding.
Here is some sample code:
... //BookmarkOptions class contains in the DevExpress.RichEdit.v10.1.Core.dll assembly var bmo = new DevExpress.XtraRichEdit.BookmarkOptions(); bmo.Color = Color.Aqua; bmo.Reset(); //HorizontalRulerOptions class contains in the DevExpress.RichEdit.v10.1.dll assembly var hro = new DevExpress.XtraRichEdit.HorizontalRulerOptions(); hro.Visibility = RichEditRulerVisibility.Hidden; //PrintingSystem class contains in the DevExpress.XtraPrinting.v10.1.dll assembly var ps = new DevExpress.XtraPrinting.PrintingSystem(); ps.PageSettings.PaperKind = PaperKind.Letter; ...
Try this solution, and notify us about your results.
Thanks,
Elliot
Works like a charm. Thanks for your support!
Hi Stefan,
Thank you for the reply.
I am glad to hear that you have resolved this problem. Please contact us if you experience any further difficulties.
Thanks,
Elliot