Getting Started with WPF | ComponentOne Studio Edition
In This Topic
    Using licensed components with automated testing products
    In This Topic

    Automated testing products that load assemblies dynamically may cause them to display license dialog boxes. This is the expected behavior since the test application typically does not contain the necessary licensing information and there is no easy way to add it.

    This can be avoided by adding the string "C1CheckForDesignLicenseAtRuntime" to the AssemblyConfiguration attribute of the assembly that contains or derives from ComponentOne controls. This attribute value directs the ComponentOne controls to use design-time licenses at run time.

    For example:


    #if AUTOMATED_TESTING

    [AssemblyConfiguration("C1CheckForDesignLicenseAtRuntime")]

    #endif

    public class MyDerivedControl : C1LicensedControl

    {

    // ...

    }

    Note that the AssemblyConfiguration string may contain additional text before or after the given string, so the AssemblyConfiguration attribute can be used for other purposes as well. For example:


    [AssemblyConfiguration("C1CheckForDesignLicenseAtRuntime,BetaVersion")]

    THIS METHOD SHOULD ONLY BE USED UNDER THE SCENARIO DESCRIBED. It requires a design-time license to be installed on the testing machine. Distributing or installing the license on other computers is a violation of the EULA.