The following steps describe an example process of importing your existing source files into Visual Studio:
Tip:
- If your application consists of a large number of files, consider starting by creating a project solely for the source files
you are working on.
- You can add any non-COBOL files (such as data files, HTML pages) to your projects. This enables you to edit and build them
inside the IDE. However, if there are a lot of them, Micro Focus recommends you only add the files that are frequently used
in your project.
- Create a number of folders on your machine to store your application's files.
Micro Focus recommends that you create a logical folder structure where individual folders store the files as follows:
- shared copybooks
- logical components
- binaries
- data files
- Start the process of creating a solution and projects:
- In Visual Studio, click
.
- In the
New Project dialog box, expand
.
- Click
COBOL.
- Specify the project type - such as native, managed, a web service, or a Windows form.
- In the project's properties (click
Project >
projectname Properties) specify relative paths for the following:
- Any source files
- Copybooks - go to the
Copybooks page in the properties
- References
- Build output - specify in
Output path on the
COBOL page in the properties
- Add your source files to the project. Right-click the project in Solution Explorer and click
Add > Existing Item.
By default, this is set to copy the files into the project folder.
To use the files from their current location, specify
Add as Link in the
Add Existing item dialog. This might be useful if the source files will be shared with other applications.
The files are added to the project with relative paths. They are not in a subfolder of the project and are not easy to move.
Note: By default, adding existing files to your projects starts a scan inside the IDE to determine and set any required Compiler
directives on them. The feature:
- Applies to native multi-output projects only.
- Sets any required Compiler directives on the individual files and not in the project's properties.
This feature can have a significant performance impact when working with a large code base. If you do not need it, Micro Focus
recommends that you disable it to help improve the performance.