Determining the location of an assembly so that it can interoperate with runtime

0 Likes

This article explains the different available choices to deploy a .NET assembly that is called by runtime.

Problem:

.NET assemblies that are used by a COBOL application can be deployed.

Resolution:

There are different ways to deploy a .NET assembly:


  • The assemblies can be located in the same directory where runtime is stored or listed in the local machine GAC (Global Assembly Cache).
  • The assemblies can be stored in a personal directory, declaring its path in the FILE-PATH property of CREATE and DISPLAY statements. For example:
               create "@PasGenProx"
                    namespace is "PasGenProxNS"
                    class-name is "PasswordGeneratorService"
                    file-path is "PasGenPath.xml"
                    handle in hPassGenrator

    The file declared in the FILE-PATH, PasGenPath.xml, contains these lines:

    <?xml version="1.0" encoding="utf-8" ?> 
    <FILESPEC>
    <Assembly>PasGenProx</Assembly>
    <Module>PasGenProx.dll</Module>
    <StrongName />
    <Version />
    <Culture>neutral</Culture>
    <FilePath>C:\Documents and Settings\MyUser\My Documents\MyDirectory\PasGenProx.dll</FilePath>
    </FILESPEC>

The NetDefGen tool creates DLL files used by runtime to handle events generated by .NET assemblies.

These DLL files must reside in the same directory of runtime, in the GAC, or in whatever path is declared in the NetEvents.ini file.
Note: The NetEvents.ini file must be located in the runtime directory.

Incident Number: 2360430

			
			
			
			
Date:
 
Name:
 
Description of change: 
Date:
 
Name:
 
Description of change: 
			
Old KB# 14869
Comment List
Anonymous
Related Discussions
Recommended