Developing Portable Class Libraries

The Portable Class Library project type has been deprecated by Microsoft. Instead use the Class Library (.NET Standard) project type for portable libraries. See Developing .NET Standard libraries.

The Synergy Portable Class Library project template enables you to create portable class libraries that can be added to .NET applications for multiple platforms.

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).
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.