
Adding Include Directories to the Registry
When you use the include directive, typically you specify the full path and the name of the file to include. If you are including a large number of files in your text templates, you can add include directories to the registry. After you add include directories to the registry, you can specify the file name only, without the path, for the file parameter in the include directive.
The location for include directories in the registry is as follows.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\TextTemplating\IncludeFolders
Caution: |
|---|
Incorrectly editing the registry can severely damage your system. Before you change the registry, be sure to back up any valued data on the computer.
|
To add an include directory to the registry
Open the Registry Editor (regedit).
Browse to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\TextTemplating\IncludeFolders, and click the node.
Add a key and name it by using the file name extension of your domain-specific language.
.Add a string value named Include0 that has a value equal to the path of the folder that you want to check for included files, for example, C:\TextTemplateUtilities.
Note: |
|---|
You can have more than one include folder for each file name extension. To add multiple folders, add multiple string values to the key, and name them
Include0, Include1, Include2, …
|
When you finish, your new registry key should resemble the following.
Name
|
Type
|
Data
|
|---|
(Default)
|
REG_SZ
|
(value not set)
|
Include0 |
REG_SZ
| <Your Path> |