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.
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.
For more information, see the following:
- Calling a routine in a Synergy assembly from another assembly.
- Performing Common Synergy .NET Coding Tasks, which includes information on instantiating and using a .NET class, inheriting and overriding a .NET class, and so forth.
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.)
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.