Open topic with navigation
With Synergy .NET, you can create .NET Core console applications and libraries for Windows x86 and x64 systems. Note that Synergy .NET Core development is currently experimental and unsupported.
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. The primary disadvantage to .NET Core is that it lacks some functionality available in .NET Framework. For example, WPF and WinForms libraries are not part of .NET Core, so .NET Core applications and their libraries cannot contain UI code. For more information, see Microsoft documentation for .NET Core—e.g., Microsoft's .NET Core Guide.
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, these packages (which are installed with SDI) are copied to a local NuGet repository for the project. From that point on, the NuGet packages for the project are completely separate from the packages installed with SDI. Upgrading SDI does not update these packages for existing projects (though it does update the packages used to subsequently create new projects). 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).
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. Then make sure Visual Studio options are set the way you want. For example, you can control the behavior of the Visual Studio code editor and the way IntelliSense works for Synergy DBL files. See Options for Synergy/DE projects, and note that you are not limited to the standard file extensions for Synergy DBL files (e.g., .dbl for code files). You can add files with other extensions (in step 3) if you specify those extensions in the Visual Studio IntelliSense dialog box for the Synergy DBL text editor. See IntelliSense, text editor options for information.|
|2.||In Visual Studio, create a project for each assembly in your application, and put all these projects in one solution. You can use the following project templates for .NET Core development:|
For example, to create a .NET Core console application, open Visual Studio without opening a project or solution. Then select File > New Project, select Synergy/DE > Installed (in the New Project dialog), and select "Console Application (.NET Core)" from the list of project templates. You’ll need to set a few options for the project (name, location, and so forth); then click OK to create the project.
If you create a project when no solution is open in Visual Studio, a solution is automatically created to contain the project. Then, if this solution is open when you create other projects (e.g., class library projects), those projects will be added to the solution. See Using Projects with Synergy .NET 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 listed in Synergy .NET Requirements.|