|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
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 DriveLetter:\Program Files\Visual Studio 9.0\Common7\IDE on the Team Explorer client computer.
To use the witimport command, you must be a member of the Team Foundation Administrators security group or the Project Administrators security group. For more information, see Team Foundation Server Permissions and Team Foundation Server Default Groups, Permissions, and Roles.
Even if you are logged on with administrative credentials, you must open an elevated Command Prompt to perform this function on a server that is running Windows Server 2008. To open an elevated Command Prompt, click Start, right-click Command Prompt, and click Run as Administrator. For more information, see the Microsoft Web site.
The path to the XML definition file that contains the work item type to be imported.
If you are running Windows Vista, you might not have access rights to certain folders. If you try to export the work item type to a location where you do not have access rights, the registry virtualization technology automatically redirects the exported file and saves it to the virtual store. For more information, see http://go.microsoft.com/fwlink/?LinkId=92325 and http://go.microsoft.com/fwlink/?LinkId=92323. To avoid this redirection, you can export the file to a location where you have access rights.
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.
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.
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.
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