Skip to main content

Debug a Recognition Script Validation Script Workflow Agent or Export Connector created with .NET 2.0 thru 3.5 SP1 with Visual Studio 2008 or 2010


QAID # 16107 Published 

Question / Problem:

Using Visual Studio 2008 or 2010, with .NET Framework 4.0 installed, why is Visual Studio unable to debug a VB.NET or C# Recognition Script, Validation Script, Workflow Agent or Export Connector created with .NET 2.0 thru 3.5 SP1?

Answer / Solution:

Capture was created using Visual C++ and Visual Basic 6 as well as .NET Framework 2.0 (Capture 8.0) or .NET Framework 3.5 SP1 (Capture 9.0 and 10.0).

Because of this blend of Managed (.NET) and Unmanaged (Non-.NET) components, some modules, such as Administration, Validation and Export, are "Unmanaged", and will run against the latest version of the .NET Framework installed, which can be .NET Framework 4.0.

When a customization that was created in .NET 2.0, 3.0, 3.5 or 3.5 SP1, such as a VB.NET Validation Script is debugged, Visual Studio is expecting the .NET 2.0-3.51 debugger to load the DLL.

If the customization is loaded against .NET Framework 4.0, this does not occur, so Visual Studio is then unable to communicate with the debugger, and no breakpoints are intercepted.

To work around the issue, it is recommended to redirect the module loading the .NET 2.0-3.5 SP1 customization to utilize .NET CLR 2.0.

This can be done by creating/modifying a Configuration file for the customization:

  1. Open Notepad and paste the following into the editor:
<?xml version="1.0"?>
<supportedRuntime version="v2.0.50727"/>
<requiredRuntime version="v2.0.50727" safemode="true"/>
  1. Save the file as <module>.exe.config for the module involved (in the Capture\BIN folder):
    Administration admin.exe.config
    Recognition Server fp.exe.config
    Validation index.exe.config
    Verification verify.exe.config
    Export release.exe.config

IMPORTANT: If a .exe.config file already exists, modify the existing file rather than overwriting it, so that existing settings are preserved.

Visual Studio should then be able to attach to the module beign debugged, and utilize the .NET 2.0-3.5 SP1 debugger.

After debugging, simply delete/restore the files.

Applies to:

Product Version
  • Was this article helpful?