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 is part of your application, and you will put all projects for an application in a single solution. There are many types of Synergy projects you can create. Some are for traditional Synergy; others are for Synergy .NET. See Synergy/DE project templates for more information.

Visual Studio solutions, however, are not 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 solution with 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.

However, 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 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 Customizing Visual Studio behavior for Synergy projects below.) 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:

Customizing Visual Studio behavior for Synergy projects

You can customize many aspects of Visual Studio’s behavior for Synergy projects. You can control

File types and build actions

There are also settings that control how different file types (files with different extensions) are treated in Synergy projects. By default, Visual Studio treats Synergy project files with the .dbl and .dbc extensions as compilable files, and it treats Synergy project files with the .def or .rec extension as content (non-compilable) files. You can customize this by

You can set Build Action for a file in a Synergy project to one of the following. Files with unrecognized extensions default to None.

2. Changing the Build Action for a specific source file in a 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.

To clear only Synergy-related errors and warnings from the Error List, select Tools > Clear Error List from the Visual Studio menu.