Developing for .NET Framework

The following are the basic Synergy .NET development steps for desktop and server applications for .NET Framework on Windows x86 or x64. Most of these steps outline Visual Studio procedures, so see Visual Studio documentation for more information.

1. Start by reviewing Synergy .NET Requirements and the SDI requirements page (www.synergex.com/synergy-dbl-integration). Then set options for your Visual Studio environment as necessary. For example, you can control the behavior of the Visual Studio code editor (indentation, tab size, etc.), the way IntelliSense works for Synergy DBL files, and which file types are automatically treated as compile or content files. See Options for Synergy/DE projects for more information.
2. In Visual Studio, create a project for each assembly in your application, and put all the projects for your application in one solution. You can use the following project templates for .NET Framework development:

ASP.NET Server Control Library

Class Library (.NET Framework)

Class Library (.NET Standard)

Console App (.NET Framework)

Empty Project

Interop

Synergy Custom Action

Synergy/DE Repository

Unit Test Project (.NET Framework)

WCF Service Library

Windows Forms Application

Windows Forms Control Library

Windows Service

WPF App (.NET Framework)

WPF User Control Library

For example, to create a console application (an application that runs from the command line), select File > New > Project in Visual Studio. Then select the "Console App (.NET Framework)" template. (You can use the New Project dialog's search field to find this.) See Synergy projects, solutions, and files for more information, and note the following:

3. Add DBL code, references to any needed assemblies, and other items to the projects for your application. See Synergy/DE item templates for information on new items you can add to a project, and note the following:
4. Set project properties, which include settings for licensing, deployment, and building/compiling. See Synergy/DE project properties. For information on setting environment variables for a project, see Environment variables and Visual Studio development. For information on setting project properties for ClickOnce Deployment, see ClickOnce Deployment for Synergy .NET below.
5. Build and debug the solution in Visual Studio using Visual Studio build and debug commands. See Visual Studio documentation for information on build features and the debugger. See Debugging Synergy .NET Code for debugging information specific to Synergy .NET. And see the Project Only information in SDI features for information on commands that enable you to build or rebuild (or clean) an individual project without affecting other projects in the solution, even referenced projects.
6. Deploy your application to machines that meet deployment requirements listed in Synergy .NET Requirements.

ClickOnce Deployment for Synergy .NET

Note

Use ClickOnce only for very simple deployments for Synergy .NET Windows desktop applications. ClickOnce deployment is not supported for traditional Synergy or Synergy .NET Core applications.

ClickOnce is a Microsoft deployment technology that enables you to deploy self-updating, self-contained Windows desktop applications that don’t require administrative access to user systems. Setting up ClickOnce deployment can be as easy as setting properties on the Publish page of project properties and then clicking a publish button, but you may need to do more. For example, you may need to specify a Synergy license server.

Synergy .NET supports ClickOnce deployment through the following:

See Microsoft documentation for more information on ClickOnce deployment.

Note

All ClickOnce deployments of Synergy applications should be to systems with Synergy/DE. The development system and target systems must have the same version of synrnt.dll and the same hotfixes, if any have been applied.

Processor-independent application assemblies are not supported. Synergy applications deployed with ClickOnce must be built for either x86 or x64.

Although it is not supported, you may be able to deploy to a system that does not have Synergy/DE if your application doesn’t use HTTPS (with the Synergy HTTP document transport API), SQL Connection, or encryption (including xfServer). If you attempt this, note the following:

  • The Visual C++ components of Visual Studio must be installed on the development machine.
  • The following must be installed on target machines before deployment with ClickOnce: Visual C++ 2012 Runtime Libraries (x64) and Visual C++ 2012 Runtime Libraries (x86).
  • You must set a Synergy license server for ClickOnce deployment on the Runtime Settings page of project properties. This is required whenever a target machine has not been configured for Synergy licensing.
  • You must set the Publish Status for synrnt.dll to “Include”, rather than “Prerequisite”. (Publish Status can be set in the Application Files dialog, which opens when you click “Application Files” on the Publish page of project properties.)