I was recently presented with an odd problem. The COBOL team at work was making the switch to using COBOL.NET, but the compiled DLLs were constantly becoming locked. Instead, they wanted the COBOL.NET compiler to create INT files. There was no build action for individual CBL files for this, and the cblproj file had no option to compile the .CBL files to INT. For those that may be confused by that sentence, each individual CBL file is compiled to a DLL in COBOL.
I checked the compiler out, and it did have the appropriate switches to create INT files. So, I opened up the project file to find the targets file it was importing. A short time later, I found the targets file and had reflected it’s task DLL. After a little trial and error, I discovered the set of properties necessary to set in your cblproj file to compile COBOL files to INT with Micro Focus.
Unload the project, then edit it. Change these values in the first property group.
<OutputType>IntGnt</OutputType>
<LinkMultiDlls>false</LinkMultiDlls>
In the second property group, under OutputPath, place the following:
<IntermediateOutputPath>$(OutputPath)</IntermediateOutputPath>
The first set changes the type of output to IntGnt instead of Library. Unfortunately, if LinkMultiDlls is true, it will attempt to link non-existent DLLs. IntermediateOutputPath is set so the INT files are output to the appropriate folder. Otherwise, they are placed in the obj folder and never moved because Cobol task doesn’t set the output items when it creates something other than DLL files.