Synergy files, projects, and solutions

This topic includes the following sections:


When you develop with Visual Studio, Synergy DBL code files are contained in Synergy projects, and projects are contained in Visual Studio solutions.

In general, you will create a Visual Studio project for each program and library that makes up an application, and you will put all projects for an application in a single solution. There are several types of Synergy projects you can create. Some are for traditional Synergy; others are for Synergy .NET. (See Synergy/DE project templates.)

Visual Studio solutions, however, aren’t language specific. A Visual Studio solution can contain a mix of Synergy and non-Synergy projects, it can contain a mix of traditional Synergy and Synergy .NET projects, and projects in a solution can share resources. For example, if you use the same core code for a traditional Synergy application and a Synergy .NET application, you can create a traditional Synergy project and a Synergy .NET project that share that code, as illustrated in figure 1 below.

1. Different projects can share source files.

Note that Synergy .NET projects cannot reference traditional Synergy projects and libraries, and vice versa. (Although routines accessed via xfServerPlus can be converted for native .NET access. See Preparing Existing Code for Synergy .NET.) So if you have a solution with both traditional Synergy and Synergy .NET projects, you can build the projects together, but you probably won’t be able to deploy them as a single application.

For more information on Synergy .NET projects and how they relate to .NET assemblies, see Using Projects and Portable Class Libraries with Synergy .NET.

Project files, folders, and builds

Each Synergy project consists of a project folder, a project file (or files), and other associated files and subfolders. Synergy projects have a fairly standard set of files and folders, so see Visual Studio documentation for general information on projects. There are, however, a few differences:

A project can be built to run as a 32-bit application or a 64-bit application, it can be built in debug or release mode, and it can be built to target an earlier version of Synergy/DE. (See Controlling Visual Studio behavior for Synergy projects and files.) When you build a project, Visual Studio automatically runs a Synergy compiler (and linker for traditional Synergy) behind the scenes to generate program and library files. These are ELBs and DBRs for traditional Synergy, or .exe and .dll files for Synergy .NET.

If you build in debug mode, the compiled program will include symbol information for debugging. (Synergy .NET files built in debug mode reference .pdb files, which have symbolic debug information. For information on .pdb files, see Visual Studio documentation.) Note the following:

IntelliSense for Synergy files

SDI supports Visual Studio's IntelliSense features for Synergy source files in Synergy projects (traditional Synergy and Synergy .NET). When you open a Synergy file in the Visual Studio text editor, you can tell whether IntelliSense is available for that file by looking at the drop-down lists in the Visual Studio navigation bar. If these drop-down lists display information, IntelliSense is available for the file. If they are empty, IntelliSense is not available.

2. The Visual Studio navigation bar.

For IntelliSense to be available for a Synergy file,

IntelliSense will be available for routines in an ELB or OLB only if the project for that ELB or OLB is referenced. If instead the .elb or .olb file is referenced, IntelliSense will not be available for the routines in that library. See Referencing ELBs and OLBs for more information.

An internal SDI or Visual Studio error can prevent IntelliSense from working.

The DBL Background pane of the Visual Studio Output window logs IntelliSense information. This is for Synergy/DE Developer Support, but it may have information that could help you troubleshoot IntelliSense issues. See SDI features and components for more information.

Files with DBL$ or SYS$ routines

If a traditional Synergy file for OpenVMS includes DBL$ or SYS$ routines, in order for IntelliSense to work, the Synergy project that contains the file must reference the VmsCompatibility library.

IntelliSense with prototype-only references

If your project includes a prototype-only reference, the first drop-down list in the navigation bar will have two project selections when the referenced file is the active file in the Visual Studio text editor. IntelliSense for local entities (e.g., local variables) will be available only if the project that contains the referenced file is selected in this drop-down list. If instead the project with the prototype-only reference is selected, change this to the referenced project.

Using the Error List in Visual Studio

If the Error List in Visual Studio (View > Error List) displays a lot of errors, keep in mind that you can filter this list so that it is limited to the current project, the current document in the editor, or all documents open in the editor. (The Current Project filter is often very helpful.) You can also use the search feature to find specific words or phrases in the Error List, and you can filter out errors, warnings, or messages.