Change the Defaults to Replicate Your Existing Project Structure

Change the location of source files

To add an existing COBOL source file to your project, right-click the project in Solution Explorer and choose Add > Existing item. You can then browse to the sources you want to add.
  • If you click Add, Visual COBOL makes a copy of the file, which it saves in the project folder. Any edits you make to this file do not get applied to the original.
  • If you click Add As Link, a reference to the original file, rather than a copy of it, is added to the project in Solution Explorer. If you then open the file in Visual Studio, any edits are applied to the file in its original location.

You can also drag files from Windows Explorer and drop them into your project in Solution Explorer. This also makes a copy of the file and leaves the original in place.

To remove a file from your project, but not delete the file on disk (whether added as a link or not), right-click the file in Solution Explorer and choose Exclude From Project.

Change the location of built files

By default, built artefacts for the Debug configuration are created in the ..\Location\Solution\Name\bin\x86\Debug folder.

You might want to change this, so that several developers can save built items in the same folder for example. To do this, right-click the project in Solution Explorer and choose Properties. In the COBOL tab, change the value of the Output path field to the preferred folder. (We recommend you always use relative paths when entering this value.) When the project builds, the output files will be saved in this folder, and the folder created if it doesn't already exist.

To change the output path for the Release configuration, select Release Configuration in the COBOL property page and change the value of the output path.

Change the type of built files

The default output and target types when you create a project depend on the project type. You can change these settings on the project Properties page. Use the following table to show the default output and target types for each project and the possible changes once the project has been created :

Project type Output type Target type Possible output types Possible target type
Native Console application .exe single .dll, .exe single, multi
Windows application .exe single .dll, .exe single, multi
Link library .dll single .dll, .exe single, multi
Enterprise Server application .dll multi .dll, .exe single, multi
INT/GNT application .int multi .int,.gnt multi
Managed Console application .exe single .dll, .exe single
Windows application .exe single .dll, .exe single
Link library .dll single .dll, .exe single
Procedural multi-output project .dll multi .dll, .exe multi