Previous Topic: Strong NamingNext Topic: Build Tool


Compilation

To compile the EABs into an assembly, use a CSC command similar to the following:

csc /target:library /out:eab.dll "/lib:%GENxx%Gen\.net\bin" /reference:CA.CAGen.abrt.dll,CA.CAGen.csu.dll,CA.CAGen.exits.dll,CA.CAGen.vwrt.dll,CA.CAGen.odc.dll assemblyinfo.cs EAB1*.cs EAB2*.cs EAB3*.cs …

where:

/target:library specifies that the result of the compilation is an assembly (DLL)

/out:eab.dll specifies the name of the output assembly (EAB.DLL)

"/lib:%GENxx%Gen\.net\bin" specifies the directory where the assembly to be referenced during the compilation reside.

Note: The surrounding quote marks are required as the IEF environment variable typically contains spaces.

/reference:CA.Gen… specifies a comma separated list of assemblies to be referenced during the compilation

assemblyinfo.cs is the file containing the assembly attributes.

EAB1*.cs EAB2*.cs EAB3*.cs … specifies a space separated list of C# source files to be compiled. The asterisk is used to cause the EAB file plus its import and export view class files to be compiled as a single unit.

You may see a warning similar to the following:

DEMOEAB.cs(1,11): warning CS3012: You must specify the CLSCompliant attribute on the assembly, not the module, to enable CLS compliance checking

This is caused by the presence of the module attribute at the top of the source file to set the CLSCompliant attribute to true. For assemblies, this setting is unnecessary. The warning may be safely ignored or the module attribute setting may be commented out.

Note: xx refers to the current release of CA Gen. For the current release number, see the Release Notes.