This topic includes the following sections:
When you install Synergy DBL Integration for Visual Studio (SDI), the Synergy DBL language, the 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 Snippets 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 on the right-hand side of the Location 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) and support for EditorConfig. See Options for Synergy/DE projects, Synergy/DE project properties, and Using EditorConfig with Synergy projects.
- 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 Configurations, platforms, and profiles.
- 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.
Features available to all Synergy projects in Visual Studio
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. See Using the C# to DBL Code Converter.
- 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. See Using the C# to DBL Solution Converter.
- 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 www.synergex.com/docs or locally installed Synergy/DE documentation.
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.) It also 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 Creating a prototype-only reference. 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 Visual Studio project properties to the selected program.
- The following menu entries are added to the Tools menu when a traditional Synergy project is open in Visual Studio: "Synergy Composer", which launches Composer (a user interface designer for UI Toolkit applications) and "Synergy Method Definition Utility", which launches the MDU utility (a utility used to add, change, and delete data in Synergy method catalogs).
xfODBC specialization file
SDI includes the xfODBCSpecialization15.dll file, which is specifically for xfODBC. This file enables xfODBC data sources to be used in the data designer for Visual Studio 2017 and 2019. To use xfODBC data sources in these versions of Visual Studio, you must install SDI (even if you don't plan to develop Synergy applications or libraries in Visual Studio).