When you install Synergy DBL Integration for Visual Studio (SDI), the Synergy DBL language, Synergy compilers, and Synergy debugging are integrated with Visual Studio. This integration enables you to
- create Synergy projects in Visual Studio. SDI supports project wizards and designers in Visual Studio and includes Synergy project and item templates. See Synergy/DE project templates and Synergy/DE item templates for more information.
- write and edit code using the Visual Studio editor. You can use features such as IntelliSense, colorization, and regions. SDI also includes Synergy-specific code snippets.
For information on snippets, open the Code Snippet Manager (Tools > Code Snippet Manager), select Synergy as the language, and expand the Snippets > Synergy branch of the Location pane. If you select a snippet node in that branch, a description of the snippet and the snippet shortcut will display in the pane.
- set Synergy-specific Visual Studio settings. SDI includes Synergy-specific project, text editor, and IntelliSense settings, including a way to register file extensions other than the defaults (.dbl, .dbc, .def, and .rec). See Options for Synergy/DE projects and Synergy/DE project properties.
- build Synergy projects in Visual Studio. You can set build options (e.g., compiler options) in Visual Studio, and you can employ different build configurations (such as 32-bit or 64-bit). See Synergy files, projects, and solutions for more information.
- debug Synergy applications and libraries from within Visual Studio. For both traditional Synergy and Synergy .NET, you’ll use Visual Studio commands to debug within Visual Studio. SDI's support for Visual Studio includes support for remote debugging, which enables you to debug Synergy programs running on other machines. For traditional Synergy, remote debugging enables you to debug Synergy programs on remote Windows, UNIX, and OpenVMS machines, and it enables you to debug traditional Synergy programs even when there are no Visual Studio projects for the programs. See Debugging traditional Synergy with Visual Studio and Debugging Synergy .NET Code.
SDI also includes Synergy-specific help topics for Visual Studio (see Getting help for Synergy in Visual Studio), as well as menu entries for Synergy features.
For Synergy projects, the following are available on the Visual Studio Build menu:
- Stop Build on First Error stops a build as soon as an error is encountered in a Synergy project.
- Project Only, which has the following project-specific versions of standard Visual Studio build commands: Build Only Project, Rebuild Only Project, Clean Only Project. Project Only is available on the Build menu only when a Synergy project node is selected in Solution Explorer. It is also available on the context menu that opens when your right-click a project node in Solution Explorer.
The difference between the commands under Project Only and the standard project-specific build commands (e.g., Build > Build MyProject) is that the Project Only commands do not affect referenced projects. The standard project-specific commands do affect (i.e., they do build, rebuild, and clean) referenced projects. Note, however, that we generally recommend using solution builds to ensure that resulting assemblies are built correctly. If you do build projects separately, the Clear Error List command (discussed below) can make it easier to use the Visual Studio Error List.
Additionally, a few menu entries are added to the Tools menu when a solution with a Synergy project is open in Visual Studio:
- C# to DBL Code Converter opens a utility that converts C# code to Synergy DBL code.
To access this utility, select Tools > C# to DBL Code Converter from the Visual Studio menu. For help with the code converter, select Help > View Help from the code converter menu.
- C# to DBL Solution Converter opens a utility that converts a C# solution into a Visual Studio solution with Synergy .NET projects.
To access this utility, select Tools > C# to DBL Solution Converter from the Visual Studio menu. For help with the solution converter, select Help > View Help from the solution converter menu.
- Clear Error List removes Synergy-related errors and warnings from the Visual Studio Error List. This can be useful when using Project Only builds. For example, if you individually build three Synergy projects in the same Visual Studio session, errors for all three builds will be displayed in the Error List unless you use the Clear Error List command between builds.
- Command Prompt (x86) and Command Prompt (x64) open the standard Visual Studio Command Prompt. This prompt automatically sets environment variables for .NET Framework tools. See Microsoft documentation for information.
- Synergy/DE Repository launches Synergy/DE Repository.
- Synergy Background Log File displays logging for use by Synergy/DE Developer Support.
- Online and Local entries under Synergy/DE Documentation launch the Synergy/DE documentation at docs.synergyde.com or locally installed Synergy/DE documentation.
- Synergy Composer launches Composer, a user interface designer for UI Toolkit applications. (This menu entry is available only for traditional Synergy projects.)
- Synergy Method Definition Utility launches the MDU utility. This utility is used to add, change, and delete data in Synergy method catalogs. (This menu entry is available only for traditional Synergy projects.)
The context menu that opens when you right-click an .INCLUDE statement includes Open File, which opens the specified include file in the Visual Studio editor.
A DBL Background pane is available in the Visual Studio Output window. This pane logs background IntelliSense and prototyping messages and is for use by Synergy/DE Developer Support. To view this pane, open the Visual Studio Output window (View > Output) and select “DBL Background” in the “Show output from” drop-down list at the top of the window.
Additional features for Synergy .NET
For Synergy .NET projects, SDI also includes runtime libraries for Windows and Linux desktop and server applications. (A NuGet package is available with runtime libraries for devices; see Synergy .NET Requirements.) And it includes Synergy-specific Watch and QuickWatch commands for debugging (see Debugging Synergy .NET Code).
Additional features for traditional Synergy
For traditional Synergy development, SDI also includes the following:
- A project conversion utility (syn2vs) that turns Workbench projects and other Synergy files into Visual Studio projects. See the document Migrating Traditional Synergy Projects to Visual Studio in the Resource Center on the Synergex website for information on this feature and important issues you should keep in mind as you move traditional Synergy code to Visual Studio.
- Project templates for OLB, ELB, and DBR projects.
- An enhanced Reference Manager dialog that enables you to reference ELBs and OLBs in locations defined by environment variables. See Referencing ELBs and OLBs.
- A project setting that enables you to control link order for libraries. See Setting link priority for traditional Synergy in Visual Studio.
- A Prototypes node under each project node in Solution Explorer. This is for a feature that enables you to resolve circular references as described in step 4 of Developing a traditional Synergy application. For information on using this feature with legacy code that has been moved into Visual Studio, see the document Migrating Traditional Synergy Projects to Visual Studio in the Resource Center on the Synergex website.
- For Multiple Mainline projects, the “Start Debugging”, “Start Without Debugging”, and “Set as Startup Object” menu entries are added to the context menu that opens when you right-click a source file in Solution Explorer. “Start Debugging” and “Start Without Debugging” run the .dbr for the source file you right-clicked. “Set as Startup Object” sets the “Startup object” option on the Application page of Project Designer to the selected program. See Application page, Project Designer for information.