Synergy .NET Basics

This topic includes the following sections:

 

.NET applications are made up of assemblies: executable assemblies and class library assemblies. Synergy .NET components enable you to create Synergy executables and libraries for .NET Framework on Windows (x86 and x64) and .NET 6 and higher on Windows (x86 and x64) and Linux.

The following table lists supported platforms. For information on requirements, see Synergy .NET Requirements and SDI Requirements, Compatibility, and Upgrades.

Platform Device licensinga Project templatesb NuGet packagesc
.NET Framework on Windows x86 or x64 Optional

ASP.NET Server Control Library

Class Library (.NET Framework)

Class Library (.NET Standard)

Console App (.NET Framework)

Empty Project

Interop

Multiple Mainline (.NET Framework)

Synergy Custom Action

Synergy/DE Repository

Unit Test Project (.NET Framework)

WCF Service Library

Windows Service

Synergex.Projects.Templates
Synergex.ProjectItem.Templates

For .NET Standard only: Synergex.SynergyDE.synrnt and
Synergex.SynergyDE.Build

.NET 6 or higher on Windows and Linux Not supported

Console App (.NET)

Class Library (.NET)

Class Library (.NET Standard)

Multiple Mainline (.NET)

Script

Synergy/DE Repository

Unit Test (.NET)

Synergex.SynergyDE.synrnt
Synergex.SynergyDE.Build
Synergex.Projects.Templates
Synergex.ProjectItem.Templates

a. See Licensing .NET assemblies for information on device licensing.

b. See Synergy/DE project templates for information on project templates.

c. See Synergy .NET libraries and NuGet packages below for information.

There are a number of advantages to developing with Synergy .NET. In addition to the benefits of managed code and the Visual Studio IDE, Synergy .NET assemblies can use .NET classes, they can interoperate with assemblies written in other .NET languages (such as C# or VB), and more.

Synergy projects and Synergy DBL: the building blocks

Project templates are the starting points for Synergy .NET application and library development. You’ll use project templates to create Synergy projects, and you’ll build Synergy applications and libraries from those projects. See Synergy projects, solutions, and files for more information. Synergy templates are available in Visual Studio when SDI is installed, and they are also distributed in the following NuGet packages for use with the .NET CLI (i.e., the “dotnet” command): Synergex.Projects.Templates and Synergex.ProjectItem.Templates.

In code files for your Synergy projects, you’ll use Synergy DBL statements, routines, etc., that are supported for Synergy .NET. See Synergy DBL Support for .NET for information on which Synergy DBL features are supported for .NET, and note that the grid that appears at the top of each topic for a Synergy DBL routine indicates whether the routine or statement is supported for Synergy .NET. If WN is visible in the grid (as it is for XRETURN for example), the routine or statement is supported for Synergy .NET, although there may be restrictions. See Documentation conventions  for more information on this grid.

Synergy .NET components

Synergy .NET is not a Synergy/DE product. Rather, it is a term for the use of Synergy DBL with .NET. The Synergy/DE components used for Synergy .NET development are Synergy DBL Integration for Visual Studio (SDI), the Synergy .NET libraries, and the Synergy .NET NuGet packages.

Synergy DBL Integration for Visual Studio

Synergy DBL Integration for Visual Studio (SDI) is a Synergy/DE product that enables you to use Visual Studio and the .NET CLI to develop Synergy applications and libraries.

SDI enables you to use Visual Studio features (such as IntelliSense, colorization, and regions) as you develop Synergy applications, and it hooks into and provides project wizards and designers. For Synergy .NET development, SDI includes the Synergy .NET compiler, which is invoked by build features. SDI also enables you to use the Visual Studio debugger to debug your Synergy .NET code for Windows applications (via local and remote debugging) and Linux applications (via remote debugging). If a Synergy .NET assembly interoperates with code from other languages, you can step seamlessly from one language to another.

See SDI Basics for more information on SDI, and see SDI Requirements, Compatibility, and Upgrades for information on system requirements.

Synergy .NET libraries and NuGet packages

Although Synergy .NET assemblies run under a common language runtime (CLR) for the .NET Frameworks they target, some Synergy-specific runtime functionality is required. This is supplied by runtime libraries, which are included in Synergy/DE for desktop/server applications and libraries, and are included as Synergex.SynergyDE.synrnt NuGet package references for SDK-style projects. 

With SDK-style projects, there is another NuGet package, Synergex.SynergyDE.Build, which is used behind the scenes for project builds. A reference to this package is required and is automatically added to SDK-style projects.

And, in addition to being available in Visual Studio when SDI is installed, Synergy project and project item templates are distributed in the following NuGet packages for use with the .NET CLI (i.e., the “dotnet” command): Synergex.Projects.Templates and Synergex.ProjectItem.Templates.

Note

To update NuGet packages for existing projects, you must use the NuGet Package Manager. See Microsoft documentation for more information (e.g., Install and manage packages in Visual Studio using the NuGet Package Manager).

SDI also includes the following libraries:

Compile-time defines

The following compile-time defines enable you to conditionally compile code for .NET:

For more information, see Built-in compiler definitions.

Using environment variables

Environment variables can be used for Synergy .NET development (e.g., for build-time settings) and runtime settings. See Environment variables and Visual Studio development for information.

Using Synergy/DE repositories

To use a Synergy/DE repository with a Synergy .NET project, you can either create a repository project and then reference that project, or use RPSMFIL and RPSTFIL (or RPSDAT) to specify the location of repository files. See Using Synergy/DE repositories in Visual Studio for more information.

Other options for .NET

Synergy .NET is the primary solution for .NET development for Synergy, but there are other options: