Developing for .NET Core

With Synergy .NET, you can create .NET Core console applications and libraries for Windows x86 and x64 systems.

The .NET Core framework is generally updated more quickly than .NET Framework, and .NET Core applications generally take less memory, run faster, and make for smaller deployments than equivalent .NET Framework applications. Additionally, if you create a self-contained deployment, changes to framework versions on deployment machines will not affect your application. For more information, see Microsoft documentation for .NET Core — e.g., Microsoft's .NET Core Guide.

Note

Projects created from Synergy .NET Core templates automatically include the Synergex.SynergyDE.synrnt and Synergex.SynergyDE.Build NuGet packages, which are required. When a Synergy .NET Core project is created, the latest packages (that are not pre-release) are downloaded to a local NuGet repository for the project. To update NuGet packages for existing projects, you must use the NuGet Package Manager. See Microsoft documentation for more information (e.g., NuGet Package Manager UI).

.NET Core development steps

The following steps outline the basic procedure for creating a .NET Core application from Synergy templates. 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 Core development:

Console App (.NET Core)

Class Library (.NET Core)

Class Library (.NET Standard)

Synergy/DE Repository

For example, to create a .NET Core console application, select File > New > Project in Visual Studio. Then select the "Console Application (.NET Core)" 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, resources, and other items to the Visual Studio projects for your application, and make sure each project references any needed assemblies. 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.
5. Create preliminary builds and debug the project in Visual Studio using Visual Studio build and debug commands. When a .NET Core application is built from Visual Studio, it is built as a framework-dependent application, which is a .dll file designed to be run using the dotnet command (or from Visual Studio).
6. For the final, deployable build, use the dotnet publish command. See Microsoft’s documentation on deployment with CLI tools. The dotnet publish command enables you to create self-contained or framework-dependent builds. For example, when the following command is run in the same directory as a .NET Core solution, it creates a self-contained build (an .exe file) for .NET Core on Windows x64:
dotnet publish -c Release -r win10-x64
7. Deploy to machines that meet deployment requirements (including licensing requirements) listed in Synergy .NET Requirements.