Synergy projects, solutions, and files

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.

Generally, 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. See Synergy/DE project templates for information on the types of Synergy projects you can create.

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 both use that code, as illustrated in figure 1 below. In this configuration, the shared code would be included in both projects that use it (at least one project would add it as a link).

Note, however, that Synergy .NET projects cannot reference traditional Synergy projects and libraries, and vice versa. 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.

1. A solution can have different types of projects, and different projects can share source files.

For more information on Synergy .NET projects and how they relate to .NET assemblies, see Visual Studio Projects for Synergy .NET.

Project files and folders

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:

Additionally, note the following:

File types and build actions

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

A source file's Build Action setting determines how it will be treated at build time. You can set the 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.

Builds

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.

A solution or project can be built to run as a 32-bit application or library or a 64-bit application or library, it can be built in debug or release mode, and it can be built to target an earlier version of Synergy/DE. Project and solution builds are controlled by some project settings and configuration/platform settings. See Build page of Visual Studio project properties and Configurations, platforms, and profiles for more information.

Output folders

When a project or solution is built, the output path, which is set on the Build page of project properties, determines where built files for the projects will be located. Build page settings are specific to a platform/configuration combination, so there can be as many output folders as there are platform/configuration combinations.

For example, if you have a traditional Synergy solution with Debug, Release, and Test solution configurations and x86 and x64 solution platforms, the default output path settings for these configurations and platforms would result in the output folders shown in figure 3.

3. Output folders for a solution with traditional Synergy projects.

And if you have a Synergy .NET project with Debug, Release, and Test configurations and the Any CPU platform, the default output path settings for these would result in the output folders shown in figure 4.

4. Output folders for a solution with Synergy .NET projects.

For more information see Configurations, platforms, and profiles.