Compiling .NET COBOL Projects


In order for the Micro Focus Enterprise extension to work with .NET COBOL projects, you need the following software installed:

  • A licensed installation of one of the following Micro Focus products, release 7.0 or later:
    • Enterprise Developer for Visual Studio
    • Enterprise Developer Build Tools
    • Enterprise Developer Unix Components
    Note: Enterprise Developer for Eclipse, and Enterprise Server are not supported.
  • Microsoft's C# extension version 1.23.12 or later for Visual Studio Code.
  • Other software requirements - see the product Help of Enterprise Developer for Visual Studio for any requirements for compiling .NET Core projects.

Build a .NET COBOL Project

Your .cblproj or .sln .NET COBOL projects and solutions must be created with Enterprise Developer for Visual Studio. The .cblproj file must be stored in the same folder as the .sln file, or in a subfolder of it.

  1. Open the folder in Visual Studio Code.

    You can use a command provided by the C# extension to generate the tasks.json and launch.json file for your project.

  2. Invoke the Visual Studio Code Command Palette widget - click Ctrl+Shift+P.
  3. Scroll down, and select Generate assets for .NET COBOL build and debug from the lists of tasks available for the palette.

    This generates a tasks.json and a launch.json file in a .vscode subfolder within the folder that holds your sources. You can use these files to build and to debug your project, respectively.

  4. Click Terminal > Run Build Task to build your project.

Alternatively, if you do not want to create a tasks.json file,Micro Focus Enterprise provides an auto-generated build task for each .NET COBOL project file in the open folder:

  1. Click Terminal > Run Build Task, and select the auto generated build task, COBOL: dotnet build (projname.cblproj)

Next, see Debug .NET COBOL Projects.