Project Properties - CLR Bridge Options

Applies to TestComplete 14.10, last modified on June 5, 2019
Information in this topic applies to desktop applications only.

The CLR Bridge project settings specify a list of .NET assemblies that have functions that can be called from project scripts. Also these project settings specify the architecture of the hosting process for these .NET assemblies. To view or modify these settings:

  • Open the Properties page of the project editor and then choose CLR Bridge in the list on the left of the page.
TestComplete Project Properties - CLR Bridge

Click the image to enlarge it.

You can change the following options:

  • Selected components - Specifies the .NET assemblies whose functions you will be able to call. See Calling Functions From .NET Assemblies.

    To add assemblies that are available in the Global Assembly Cache (GAC) on the current machine, click Browse GAC, select the desired assemblies from the resulting Select Assemblies dialog and click OK.

    To add assemblies that are absent in the GAC, click Browse Files and then select assembly files via the subsequent Select Assemblies dialog. To remove the selected assembly from the list, click Remove.

    Clicking Reload will force TestComplete to release all loaded assemblies and reload the assemblies that are currently in the Selected Components list.

  • Preferred architecture of the assembly hosting process - Specifies the architecture of the helper hosting process that TestComplete uses to call functions of .NET assemblies from scripts (see Calling Functions From .NET Assemblies).

    The possible values are:

    • 32-bit - The helper process will be a 32-bit process and will be able to load only 32-bit assemblies.
    • 64-bit - The helper process will be a 64-bit process and will be able to load only 64-bit assemblies.
    • The same as the operating system - The “bitness” of the hosting process will coincide with the “bitness” of the operating system, which you use.

    Note that the 64-bit hosting process can be created only on 64-bit operating systems.

  • Preferred apartment model of the calling thread - Specifies the apartment model of the thread in which .NET assembly functions will be called (see Calling Functions from .NET Assemblies). This thread belongs to the hosting process.

    The possible values of the option include:

    • Single-threaded apartment - Ensures that the methods of a .NET object will be called in the thread that uses the STA COM model.

    • Multi-threaded apartment - Ensures that the methods of a .NET object will be called in the thread that uses the MTA COM model.

    • Does not matter - Default. TestComplete does not guarantee that the methods of .NET objects will be called in an STA or MTA thread. The thread model to be used is determined by the COM engine when the function is being called.

Notes:

  • The list of available assemblies always contains the mscorlib.dll assembly. Though this assembly is not shown in the list, it exists in it and its functions can be called from scripts.

  • 32-bit assemblies can only be loaded by the 32-bit hosting process and 64-bit assemblies can only be loaded by the 64-bit hosting process. That is, if the Selected Components list contains both 32-bit and 64-bit assemblies, TestComplete will load only those assemblies whose “bitness” matches the “bitness” of the hosting process.

  • If you opened two projects and if one of them uses the 32-bit hosting process while another uses the 64-bit hosting process, TestComplete will create two hosting processes: one for 32-bit assemblies and another one for 64-bit assemblies.

  • TestComplete does not create a special hosting process for every test project. The hosting processes are shared by TestComplete projects. That is, all projects, whose CLR Bridge settings specify the 32-bit (or 64-bit) architecture of the hosting process, will use the same instance of the hosting process - the instance that is used to load 32- (or 64-bit) assemblies.

  • The default values of the CLR Bridge settings that will be used in new TestComplete projects are specified by the Default Project Properties - CLR Bridge Options dialog.

See Also

Calling Functions From .NET Assemblies
Default Project Properties - CLR Bridge Options
Project Properties

Highlight search results