witimport
Use the witimport command to validate and import a work item type from an XML file to a team project on a Team Foundation Server. If you try to import a work item type that already exists in the specified team project, a warning prompt asks if you want to overwrite the existing work item type.
You can validate a work item type without importing it by using the /v option.
The witimport command-line utility is located in <drive >\Program Files\Visual Studio8\Common7\IDE on Team Explorer client computer.
witimport /f filename /t tfs /p teamproject [/v] [/e encodingname]
Parameters
| Parameter | Description | ||
|---|---|---|---|
| /f filename | The XML definition file that contains the work item type to be imported.
| ||
| /t tfs | The computer name of the Team Foundation Server to which the work item type will be imported, or a fully specified URL for a Team Foundation Server. | ||
| /p teamproject | The team project to which the work item type will be imported. This team project must exist on the Team Foundation Server specified by tfs. | ||
| /e Encodingname | The name of a .NET Framework 2.0 encoding. The specified encoding will be used to import the work item type XML. If this argument is not specified, witimport uses UTF-8 encoding by default. | ||
| /? | Displays the witimport context help. |
| Option | Description |
|---|---|
| /v | Validate the XML file without importing. |
The command in this example reads the file myworkitem.xml, validates the work item type it contains, and imports the validated work item to the AdventureWorks team project on the Team Foundation AdventureWorksServer. This example imports the work item type using the default UTF-8 encoding.
>witimport /f myworkitem.xml /t AdventureWorksServer /p AdventureWorks
The following example shows a command that uses a URL instead of a Team Foundation Server name. This example imports the work item type using the default UTF-8 encoding.
>witimport /f myworkitem.xml /t http://TFS:8080/bis/registration.asmx /p AdventureWorks
The following example validates and imports the work item using Unicode (utf-7) encoding.
>witimport /f myworkitem.xml /t AdventureWorksServer /p AdventureWorks /e utf-7
The following example validates the work item type in the file myworkitem.xml without importing it. This example validates the work item type using the default UTF-8 encoding.
>witimport /f myworkitem.xml /t AdventureWorksServer /p AdventureWorks /v
Note