Skip to main content
You can use external assemblies in scripts and global modules. Both standard and compiled user assemblies work.

Add external assemblies

You can add an assembly on the .NET References tab of the batch type properties, project properties, or Document Definition properties. All classes of the added assemblies are available in scripts and global modules. Assemblies added in batch type or Document Definition properties are available to that particular batch type or Document Definition. Assemblies added in project properties are shared assemblies, available to all batch types and Document Definitions in the project. If you need the same assembly for different batch types and Document Definitions, use a shared assembly. Update a shared assembly in project properties only.

Add an assembly in project properties

1

Click Add

On the .NET References tab of the project properties, click Add….
2

Select the assembly type

In the Add Assembly dialog box that opens, select the type: Standard assembly name or Attached file.
3

Specify the assembly

Depending on the selected type, either enter the standard assembly name or browse to an assembly file.
New batch types automatically receive shared assemblies.

Add a shared assembly to a batch type or Document Definition

1

Click Add

On the .NET References tab of the batch type or Document Definition properties, click Add….
2

Select Shared assembly

In the Add Assembly dialog box that opens, select Shared assembly.
3

Select the assembly name

Select the assembly name from the Reference list.
You cannot add a shared assembly whose name is similar to that of an existing standard assembly.
The following sample user assembly contains a namespace, a class, and a method:
To make the classes and methods of an added assembly accessible to the event handler scripts, add the assembly on the .NET References tab of the batch type properties (for a particular batch type) or project properties (for the Default batch type). For the following scripts, add external assemblies on the .NET References tab of the Document Definition properties: A script that uses classes and methods from the external assembly must contain the following code:

Debug external assemblies

Debugging external assemblies requires both the assembly file and a .pdb file with symbolic information. You can debug only assemblies with loaded .pdb files. Because .pdb files are large, disable loading symbolic information in the working project.

Registry keys that control the loading of symbolic information

You can use the following registry keys to control whether .pdb files are loaded: By default, these keys are not in the registry. If needed, the Administrator can add them to the registry of the user’s operating system. For the registry changes to take effect, restart ABBYY FlexiCapture. To debug an assembly, use a connection to managed code.