Synergy/DE item templates
Synergy DBL Integration for Visual Studio includes the item templates listed in Item templates below, which enable you to easily create new project items for your Synergy projects, items such as class files and unit tests.
In Visual Studio, item templates are available in the Add New Item dialog, which opens when you select a Visual Studio option that creates a new project item (e.g., when you right click a project node in Solution Explorer and select Add > New item from the context menu). The project type determines which item templates are available.
Item templates are also available in a NuGet package, Synergex.ProjectItem.Templates, which can be used with the .NET CLI. You can install these templates by running the following command:
dotnet new install Synergex.ProjectItem.Templates
If you get an error (e.g., “Synergex.ProjectItem.Templates could not be installed, the package does not exist”), the problem could be that the NuGet feed (https://api.nuget.org/v3/index.json) is not set up as a package source on your system. See Microsoft documentation on package sources for information on adding this package source. |
Then, to create an item based on one of these templates, use the “dotnet new shortname -n itemname” command, where shortname is one of the names listed as a “NuGet package short name” below, and where itemname is the name you want to assign to the new item. For example, the following creates a Synergy class file called MyClass in the current directory:
dotnet new synClass -n MyClass
For more information, see Microsoft documentation on the .NET CLI.
Item templates
About Box
NuGet package short name: synAboutBox
Adds an About box, which consists of a .dbl file, a .designer.dbl file, and a .resx file.
Application Configuration File
NuGet package short name: synAppConfig
Adds an empty configuration file (.config) for storing application configuration values and settings.
Application Manifest File
NuGet package short name: synAppManifest
Adds an application manifest file, which is a collection of application settings, including User Account Control.
ASP.NET Server Control
NuGet package short name: synServerControl
Adds an ASP.NET server control (which consists of a .dbl file with a class that extends System.Web.UI.WebControls), and adds a reference to the System.Web assembly.
Assembly Information File
NuGet package short name: synAssemblyInfo
Adds an empty Synergy code file (.dbl) for general assembly information, and adds a reference to System.dll.
Basic Unit Test
NuGet package short name: synSimpleUnitTest
Adds a .dbl file with an empty Synergy .NET unit test declaration.
Basic Traditional Unit Test
NuGet package short name: synTradUnitTest
Adds a .dbl file with an empty traditional Synergy unit test declaration.
Class
NuGet package short name: synClass
Adds a Synergy code file (.dbl) with a basic class definition.
Code File
NuGet package short name: synCodeFile
Adds a blank Synergy code file (.dbl).
ComPooling
NuGet package short name: synComPooling
Adds a Synergy code file (.dbl) with an empty COM+ pooling class definition.
Flow Document (WPF)
NuGet package short name: synFlowDoc
Adds a dynamically formatted XAML document. (Note that Synergy WPF projects are no longer supported.)
Installer Class
NuGet package short name: synInstaller
Adds a Windows installer control (which consists of a .dbl file and a .designer.dbl file) with a class for creating custom installer actions.
Interface Definition
NuGet package short name: synInterface
Adds a Synergy code file (.dbl) with an empty interface definition, and adds a reference to System.dll.
MDI Parent Form
NuGet package short name: synMDIParent
Adds an empty MDI (multiple-document interface) parent form, which consists of a .dbl file, a .designer.dbl file, and a .resx file.
Page (WPF)
NuGet package short name: synWPFPage
Adds an empty Windows Presentation Foundation (WPF) page, which consists of a .xaml file and a .xaml.dbl file. (Note that Synergy WPF projects are no longer supported.)
Resource Dictionary (WPF)
NuGet package short name: synWPFResourceDictionary
Adds an empty XAML resource dictionary. (Note that Synergy WPF projects are no longer supported.)
Resources File
NuGet package short name: synResource
Adds an empty application resource file (.resx) for storing project resources.
Settings File
NuGet package short name: synSettings
Adds an empty settings file (.settings) for storing user settings and application settings, and adds a reference to System.dll.
Schema
NuGet package short name: synSchema
Adds an empty Synergy Data Language Schema file to a repository project.
Script File
NuGet package short name: synScript
Adds an empty Synergy Script file.
Text File
NuGet package short name: synText
Adds a blank text file.
Unit Test
NuGet package short name: synUnitTest
Adds a .dbl file with basic methods for a simple Synergy .NET unit test.
User Control (WPF)
NuGet package short name: synWPFUserControl
Adds a XAML file with a blank Windows Presentation Foundation (WPF) control (UserControl), and adds references to needed assemblies. (Note that Synergy WPF projects are no longer supported.)
Window (WPF)
NuGet package short name: synWPFWindow
Adds a blank Windows Presentation Foundation (WPF) window, which consists of a .xaml file and a .xaml.dbl file. (Note that Synergy WPF projects are no longer supported.)
Windows Form
NuGet package short name: synWinFormApp
Adds a blank Windows form (which consists of a .dbl file and a .designer.dbl file) and adds references to needed assemblies.
Windows Service
NuGet package short name: synService
Adds a Windows service control (which consists of a .dbl file and a .designer.dbl file) with a class for a Windows service, and adds references to needed assemblies.
Windows UserControl
NuGet package short name: synUserControl
Adds a blank Windows user control (which consists of a .dbl file and a .designer.dbl file) and adds references to needed assemblies.
XML File
NuGet package short name: synXML
Adds an empty XML file.
XML Schema
NuGet package short name: synXMLSchema
Adds an XML schema.
XSLT File
NuGet package short name: synXSLT
Adds an XSLT file for transforming XML documents.