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 or the .NET CLI (i.e., the “dotnet” command) to create solutions and projects, and you’ll use Visual Studio or .NET CLI 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 classes and can interoperate with assemblies written in other .NET languages (e.g., C#; see figure 2 below). So in addition to invoking .NET 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.)
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.