Using Projects and Portable Class Libraries with Synergy .NET

.NET applications are made up of assemblies. An assembly can be an executable (.exe) or a class library (.dll), which 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 automatically invoke the Synergy .NET compiler) to build assemblies from these projects. See Synergy files, projects, and solutions for more information.

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

Synergy .NET assemblies are built from Visual Studio projects

For each of the assemblies that will constitute your application, you’ll need to create a Visual Studio project from one of the Synergy/DE project templates. You’ll 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 portable class 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. It’s best to include common code in a portable class library and then put platform‑specific code in platform‑specific class libraries and executables. In figure 3 below, projects for three target platforms are included in a single Synergy solution (with a portable class library project for common code):

3. Projects for all targeted platforms in one solution.

Projects for all targeted platforms in one solution

For information on creating portable class libraries, see Developing Portable Class Libraries.