Editing Applications in Visual Studio

Micro Focus recommends that you create a solution and one or more projects for your source code. A solution and a project ensure that the full functionality of Visual Studio is available to you for editing, building and debugging applications.

Solutions

Solutions are a Visual Studio concept. A solution is a container holding one or more projects that work together to create an application. Splitting your solution into a number of projects has several advantages:

  • Multiple users can work on a solution, as different users can work on different projects.
  • Breaking a solution down into a number of smaller projects makes them easier to handle and quicker to build.
  • The projects in a solution can be in different programming languages, so splitting your application into a number of projects enables you to take advantage of mixed language programming.
  • Solutions can contain projects, where some are compiled as managed code and some as native COBOL. You can use the various interoperability techniques to combine native COBOL with managed COBOL.

A solution has the extension .sln, and is a human readable text file, which you could edit, though we recommend that you use the Visual Studio IDE to do so.

Projects

A COBOL project file has the extension .cblproj, and again is human readable. It is in MSBuild format, which is explained in the Visual Studio Help. Different types of project have different extensions, so for example a C# project has the extension .csproj.

Templates for different types of COBOL projects are supplied. Each template creates the appropriate file structure to hold the project and defines the appropriate build settings.

See the Visual Studio Help for more information on solutions and projects.

Open a Folder with Source Files

In Visual Studio, you can load and work with multiple source files stored in a folder inside the IDE without creating a project first. Visual COBOL provides support for the Open Folder feature only for COBOL projects.

This feature is seen as a starting point for getting your existing source files into Visual Studio and offers limited support for editing, compiling and debugging applications. Micro Focus recommends that you consider creating a solution and one or more projects for the application as a next step.