VS2005中的一些项目模板、文件模板等等的内置宏定义
Built-In Replacement Parameters |
Parameters |
Description |
itemname |
The user-provided name from the dialog. This value is often used for naming classes and files. |
safeitemname |
The same as itemname but with all unsafe characters removed. |
safeitemrootname |
The name of the root item, which can be used for multi-item templates. For example, if you have partial classes, or a code-beside or code-behind scenario, you can use this item in the secondary files when you need the safeitemname of the main item being created. |
projectname |
The user-provided name of the project for a project template. |
safeprojectname |
The user-provided name of the project for a project template with all unsafe characters removed. |
rootnamespace |
The root namespace of the project for an item template, which can be used to replace the namespace in a project item source file. |
guid[1-10] |
A GUID that can be used as a unique identifier for uses such as project GUID in the project file. You can specify up to 10 different GUID parameters using the syntax: guidx, where x is a number between 1 and 10. |
time |
The current time in the format DD/MM/YYYY HH:MM:SS. |
year |
The current four-digit year. |
username |
The Windows username of the logged-in user. |
userdomain |
The Windows domain of the logged-in user. |
machinename |
The name of the machine where the template is being used. |
clrversion |
The version of the common language runtime being used. |
registered-organization |
The registered organization of the user based on the system settings. |
wizarddata |
A single string that can be any XML or string data included in the WizardData element in a template metadata file. |