The following sections describe limitations that apply when using Visual COBOL to create applications for use with .NET.
Visual COBOL enables you to create COBOL applications to be deployed for use with .NET 6.
A COBOL application that is to be deployed to .NET cannot include any of the following features:
If you need to use an application configuration file to configure the run-time behavior of an application that will be deployed to .NET, the configuration file must be a .dll.config file instead of a .exe.config file as it would be for .NET Framework console application.
By default, COBOL applications in .NET projects use the native file handler for their file handling operations. In order for the native file handling functionality to be available when the project is deployed and run, when you publish a .NET project the published files include the required native run-time system and file handler (as part of the MicroFocus.COBOL.Runtime package).
If you will be debugging a local .NET application on Windows where the main program is not COBOL, for example the main program is C#, you must ensure that an appropriate file handler is used. Failure to do so will result in run-time system error COBRT198 ("Load failure") on the first COBOL file I/O statement.
By default the 32-bit native version of the file handler will be available. For this to be used by your application you need to make sure the project for the main program is built to target the x86 platform.
Alternatively, to avoid any dependency on the native run-time system you can use the .NET file handler. You can switch a .NET project to use the .NET file handler rather than the native file handler by specifying the directives CALLFH(EXTFH) and CALLSORT(EXTSM) in the project.
By default, COBOL applications in .NET projects use the native file handler for their file handling operations. In order for the native file handling functionality to be available when the project is deployed and run, when you publish a .NET project the published files include the required native run-time system and file handler (as part of the MicroFocus.COBOL.Runtime package).
If you will be deploying a .NET project to an Azure .NET environment you should instead use the .NET file handler in the project to avoid dependencies that would also require the native C runtime to be deployed by the project. You can switch a .NET project to use the .NET file handler rather than the native file handler by specifying the directives CALLFH(EXTFH) and CALLSORT(EXTSM) in the project.
The following table shows the architectures and the operating systems to which you can deploy .NET-targeted COBOL applications that you have published using Visual COBOL. The supported versions of the operating systems are the ones that Visual COBOL supports:
Operating System | Architecture |
---|---|
Red Hat Enterprise Linux | x64 |
SUSE Enterprise Linux | x64 |
Ubuntu | x64 |
CentOS | x64 |
Windows Client | x64 |
x86 | |
Windows Server | x64 |
x86 |
The following operating systems are supported by .NET but cannot be used for the deployment of COBOL applications:
To be able to use Visual COBOL Build Tools for Windows to build .NET projects you must be using Microsoft's Build Tools for Visual Studio 2022. For more information see Using Visual COBOL Build Tools for Windows to Build .NET Projects.
Because Visual COBOL requires .NET version 6 and .NET version 6 is not supported by Visual Studio 2017 and Visual Studio 2019, you must be using Visual Studio 2022 or later to be able to use Visual COBOL to create COBOL applications to be deployed for use with .NET.
Using Visual COBOL for Visual Studio 2017 or 2019 to open a .NET-enabled project from a previous version of Visual COBOL results in an error informing you that the project cannot be opened.
It is not possible to use the Windows Forms Designer with projects created using the Windows Forms App (.NET) project template.