VSDir文件是一个以vsdir为扩展名的文本文件,主要为VS.NET提供"添加新项","新建项目"对话框中的信息
VSDir文件格式是以(|)来隔离同一条数据中的各个信息,以新的一行来代码一条新的数据信息
格式如下:
..\..\Projects\csharp building blocks\BusinessFacade.vsz|{AE77B8D0-6BDC-11d2-B354-0000F81F0C06}|#5015|10|#5022|{AE77B8D0-6BDC-11d2-B354-0000F81F0C06}|127|0|Project

..\..\Projects\csharp building blocks\BusinessRules.vsz|{AE77B8D0-6BDC-11d2-B354-0000F81F0C06}|#5016|20|#5023|{AE77B8D0-6BDC-11d2-B354-0000F81F0C06}|128|0|Project
这是两个不同的记录通过下面的参数可以得到其含义

Field Meaning
RelPathName Required. The name of the Wizard's .vsz file, such as MyWizard.vsz.
{clsidPackage} Optional. A GUID representing a product (such as Visual C++) that has a DLL containing localized resources. Normally, this field is blank for VSDir files that correspond with third-party Wizards.
LocalizedName Optional. This is the localizable name of the Wizard or template and the name that appears in the Add Item dialog box. This can be a string or a resource identifier of the form #ResID.
SortPriority Required. An integer representing the sort order and relative priority of the Wizard, with 1 being highest. For instance, if this item is "1," then this will appear next to other 1s and ahead of all 2s or lower.
Description Required. A localizable description of the template or Wizard as it will appear in the Add Item dialog box when the item is selected. This can be a string or a resource identifier of the form #ResID. Applies only to template files, not folders.
DLLPath or {clsidPackage} Required. Specifies a full path to a DLL or EXE file, or a GUID of a product that has a .dll file that contains an icon to load for the Wizard. The icon is loaded as a resource out of a DLL/EXE file using the given IconResourceId. This setting overrides {clsidPackage}, if specified, for icon location. Applies only to template files, not folders.
IconResourceId Optional. A resource identifier within the DLL file that determines the icon to display. If no icon is defined, the environment substitutes the default icon for a file with the same extension as the item. Applies only to template files, not folders.
Flags Required. See Flags description and table below. Applies only to template files, not folders.
SuggestedBaseName Required. The default name for the Wizard, displayed in the Name field in the dialog box. This is either a string or a resource identifier of the form #ResID. If the name is not unique, the environment appends the name with an integer. For example, MyFile.asp might be changed to MyFile1.asp. If no name is provided, then "Project" is used. Applies only to template files, not folders.

其中FLAGS的参数列表
Flag name Decimal value Description
VSDIRFLAG_NonLocalTemplate 1 Use non-local user interface behavior and save mechanisms.
VSDIRFLAG_BlankSolution 2 Create a blank (empty) solution; Do not create a project
VSDIRFLAG_DisableBrowseButton 4 Disable the Browse button for this project or item.
VSDIRFLAG_DontAddDefExtension 8 Do not append a default extension to the name provided for the item. (This setting is not valid for projects.)
VSDIRFLAG_DisableLocationField 32 Disable the location field for this project or item.
VSDIRFLAG_DontInitNameField 4096 Do not initialize the name field for this project or item with a valid name.
VSDIRFLAG_DisableNameField 8192 Disable the name field for this project or item.

如果对此感兴趣的话您可以到微软的以下网址查阅
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vxconvsdirfiles.asp
posted on 2005-07-22 14:15  forrestsun  阅读(566)  评论(0编辑  收藏  举报