How to: Create a Domain-Specific Language Solution
A domain-specific language (DSL) is created by using a specialized Visual Studio solution.
To create a domain-specific language solution
-
Start the DSL Wizard.
-
On the File menu, point to New, and then click Project.
-
The New Project dialog box appears.
-
Under Project types, expand the Other Project Types node, and click Extensibility.
-
Click Domain-Specific Language Designer.
-
In the Name box, type a name for the solution. Click OK.
The Domain-Specific Language Designer Wizard appears.
Note
Preferably, the name that you type should be a valid Visual C# identifier, because it might be used to generate code.
-
-
Choose a DSL template.
On the Select Domain-Specific Language Options page, select one of the solution templates such as Minimal Language. Choose a template that is similar to the DSL that you want to create.
For more information about solution templates, see Choosing a Domain-Specific Language Solution Template.
-
Enter a filename extension on the File Extension page. It should be unique in your computer, and in any computers on which you want to install the DSL. You should see the message No applications or Visual Studio editors use this extension.
-
If you have used the file name extension in previous experimental DSLs that have not been fully installed, you can clear them out by using the Reset the Experimental Instance tool, which can be found in the Visual Studio SDK menu.
-
If another Visual Studio Extension that uses this file extension has been fully installed on your computer, consider uninstalling it. On the Tools menu, click Extension Manager.
-
-
Inspect, and if necessary adjust, the fields in the remaining pages of the wizard. When you are satisfied with the settings, click Finish. For more information about the settings, see DSL Designer Wizard Pages.
The wizard creates a solution that has two projects, which are named Dsl and DslPackage.
Note
If you see a message that alerts you not to run text templates from untrusted sources, click OK. You can set this message not to appear again.
You can leave several of the fields unchanged from their default values. However, make sure that you set the File Extension field.
For more information about strong naming, see Creating and Using Strong-Named Assemblies.