Bug Report B195350
Visible to All Users

XtraPrinting and XtraRichEdit dependencies not recognized

created 14 years ago

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?

Show previous comments (6)
DevExpress Support Team 14 years ago

    Hi Stefan,
    Please accept my sincere apologies for the delay in responding.
    Here is some sample code:

    C#
    ... //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!

      DevExpress Support Team 14 years ago

        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

        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.