Enrolling a .NET Framework Component in the Repository

To use a .NET Framework component, the .NET assembly which contains the component must be enrolled in the Repository as a .NET Component. The .NET assembly is normally a DLL file. For Visual LANSA to locate the .NET assembly you may specify the fully qualified file name or you may register the assembly location in the standard Microsoft location.

To register the assembly location, you must modify the Windows registry. Follow these steps:

1.  Open the Registry Editor. Run regedit.exe from the Windows Start menu.

2.  On a 32-bit system navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders.
On a 64-bit system navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\AssemblyFolders.

3.  Create a new key. The name you assign this key will be used in the .NET Component.

4.  Change the value of the (Default) value. The value should be the fully qualified path of the directory where your assembly is located. This path may contain multiple assemblies.

Care should always be taken when modifying the Windows Registry.

To create a .NET Component in the Visual LANSA Repository, create a new component of type .NET Component. The new .NET Component will contain an empty Componentassembly property:

Function Options(*DIRECT)

Begin_Com Role(*EXTENDS #PRIM_OBJT) Componentassembly('')


Select the Details  in the LANSA Editor.

Method 1: Type the fully qualified name into the Componentassembly property:

Begin_Com Role(*EXTENDS #PRIM_OBJT) Componentassembly('c:\Program Files\MyAssembliesForLANSA\MyAssembly.dll')

Method 2: Type the Assembly name and the registry key name which contains the path to the assembly. The two values should be comma separated:

Begin_Com Role(*EXTENDS #PRIM_OBJT) Componentassembly('MyAssembly.dll,AssembliesForLANSA')

Alternatively, use the prompter () in the Details view. The prompter will list all assemblies that are found in the locations pointed to by all keys under the AssemblyFolders registry key described in step 2.

Select the relevant assembly and the prompter will set the Componentassembly property appropriately. To specify the assembly using a fully qualified name, click the Browse for Assembly File button. This will display the Open dialog. Navigate to the directory which contains the assembly. Select the assembly, click Open and the prompter will set the Componentassembly property appropriately.