Open topic with navigation
The Synergy Portable Class Library project template enables you to create portable class libraries that can be added to .NET applications for multiple platforms. Note that Synergy device licensing is required for Android, iOS, Universal Windows Platform (UWP), and is optional for Microsoft .NET Framework on Windows. So if you include a Synergy portable class library (or any other Synergy .NET library) in an application (even a non-Synergy application) for one of these platforms, you’ll need to implement Synergy device licensing.
To add a portable class library to an application, follow these steps. And note that these steps outline Visual Studio procedures, so see Visual Studio documentation for full information.
|1.||In Visual Studio, open the solution for the application and select File > New > Project.|
|2.||In the New Project window, select Installed > Templates > Synergy/DE > Portable Class Library. Then, in the Solution field, select “Add to solution”. Set options in this window as necessary (e.g., set the .NET Framework version and select “Add to solution” in the Solution field), and then click OK. The Add Portable Class Library window opens.|
|3.||In the Add Portable Class Library window, select the target platforms. The following are supported for Synergy .NET:|
Note that this window includes some target options that are not available for Synergy .NET development. Every target you select limits Framework resources available to the project, so select only necessary targets.
|4.||Add DBL code, resources, etc., to the portable class library project, and make sure it references needed assemblies.|
|5.||Set project properties (see Synergy/DE project properties).|
To minimize activation of device licenses during debugging and testing for UWP or Android, do the following in the project for the executable:
(iOS automatically preserves application data between deploys, so there is no option to select for this.)
|6.||In the project for the executable assembly, add a reference to the Synergy runtime libraries. See Synergy runtime libraries.|
|7.||You can now call routines in the Synergy portable class library from the non-Synergy code in the solution. See Calling a routine in a Synergy assembly from another assembly.|