Visual Studio Projects for Synergy .NET

.NET applications are made up of assemblies. An assembly can be an executable (.exe) or a class library (.dll). A class library is a collection of subroutines, functions, and/or classes that are invoked from other class libraries and executables.

To develop Synergy .NET assemblies, you’ll use Visual Studio to create solutions and projects, and you’ll use Visual Studio build features (which run the Synergy .NET compiler behind the scenes) to build assemblies from these projects. See Synergy projects, solutions, and files for more information.

1. Synergy .NET assemblies are built from Visual Studio projects.

Synergy .NET assemblies are built from Visual Studio projects

For each assembly that will constitute your application, you will need to create a Visual Studio project from one of the Synergy/DE project templates. You will then add Synergy DBL code, references to other assemblies as necessary, and other items to your project. For details, see the following:

One of the advantages to using .NET is that Synergy assemblies can use .NET Framework classes and can interoperate with assemblies written in other .NET languages (e.g., C#; see figure 2 below). So in addition to invoking .NET Framework functionality in your code, you can include Synergy projects in solutions for other .NET languages, and you can include projects for other .NET languages in Synergy solutions.

2. Synergy projects can be part of non-Synergy solutions and vice versa.

Synergy projects can be part of non-Synergy solutions and vice versa

For more information, see the following:

Note that Synergy .NET projects cannot reference traditional Synergy projects and vice versa. (Although routines accessed via xfServerPlus can be converted for native .NET access. See Converting xfServerPlus routines for native .NET access.)

Using .NET Standard libraries and targeting multiple platforms

With Synergy .NET, you can target multiple platforms by including projects for each type of platform in your Synergy solution. If possible, it's best to include common code in a .NET Standard library and then put platform-specific code in platform-specific class libraries and executables. For information on creating .NET Standard libraries, see Developing .NET Standard libraries.

Replacing a Synergy portable class library project

Portable class library (PCL) projects are no longer supported (as of SDI 11). If you have a Synergy portable class library project (from a prior SDI version), replace it with a Synergy .NET Standard project:

1. Use the Synergy Class Library (.NET Standard) template to create a new project in Visual Studio.
2. Add all the files, references, etc., that are in the PCL project to the new .NET Standard project.
3. In code, replace occurrences of the D_PORTABLE define with D_NETSTANDARD.
4. Build and test.

See Developing .NET Standard libraries for more information.