Ravendra's Blog

June 4, 2010

You have a Beta version of Team Foundation Server installed. The license information cannot be changed.

Filed under: Team foundation server 2010 — Ravendra Mishra @ 2:00 pm

I am using TFS 2010 Beta 2. Today when I click to launch TFS Administrator console I got following dialog box. Not able to do any changes at all.

You have a Beta version of Team Foundation Server installed. The license information cannot be changed.

Is there any way to override this and make some changes. I am aware that TFS 2010 Beta 2 is valid till 30th June 2010, but today its just 4th June.

Solution

Click to cancel button of the dialog box and this will launch TFS Administrator console and enable you to do everything you are supposed to.

TF14098: Access Denied: User [User] needs PendChange permission(s) for $/[Source control folder]

Filed under: Team foundation server 2010 — Ravendra Mishra @ 12:56 pm

I am member of TFS Administrators group, also member of Project Administrator and Contributor for a project. Now I am trying to delete a source control folder from this project and struck by following error.

TF14098: Access Denied: User [User] needs PendChange permission(s) for $/[Source control folder]

Solution

I just checked what are the security permissions for this folder. To do so navigate to the folder location in discussion (in local machine) and use following command

Tf perm

This will basically tell you list of all users/groups with their permission. From this list check if any the group you are the member is denied for PendChange or its directly denied for you. If yes then take the necessary steps to remove that.

Point to note here is Deny always takes precedence. Let’s say you are member of TFS Admin (where all permissions are allowed) and also project reader (where except PendChange is denied) then PendChange of reader will take precedence and you will not be allowed to delete.

June 2, 2010

Bulk edit TFS Work items

Filed under: Team foundation server 2010 — Ravendra Mishra @ 3:34 pm

TFS power tools command enable to make bulk edit on work items filtered through queries.

Consider a particular scenario when a team member is leaving the project and you want to assign all the stories, bugs etc assigned to him to a new member and also want to provide related comments. Using UI this task may be quite time consuming.

For example: Updating all work items assigned to me to be assigned to Jason (uses Query)

tfpt Query /format:id “project1\Team Queries\My Work Items” | tfpt workitem /update @ /fields:”Assigned To=Jason”

 

All other options of this command are as below:

C:\Program Files\Microsoft Team Foundation Server 2010 Power Tools>tfpt workitem /?

tfpt workitem – Create, update, or view work items

Usage: tfpt workitem [workitemid1 workitemid2 … | @ | @filename]

Usage: tfpt workitem /new type /fields:[field1=value1[;field2=value2;…]|@filename]

Usage: tfpt workitem /update [workitemid1 workitemid2 … | @ | @filename] /fields:[field1=value1[;field2=value2;…]|@filename]

Usage: tfpt workitem /uploadattachment workitemid /recursive /comment:[commenttext|@filename] file1 [file2] [file3 …]

Usage: tfpt workitem /downloadattachment workitemid [filepattern1 …] /path:folder

 

/new Specifies that a new work item of the type entered be created. The number of the new work item is displayed.

type Represents the name of the work item type to create. Use the form <project>\<workItemType>.

/update Specifies that work items should be updated. To read the list of work items from stdin put ‘@’ on the commandline. Use ‘@filename’ to read from a file.

/fields Specifies the fields that are changed and the new values to give to them.

fieldN The name of a field to update.

valueN The value to set on the fieldN.

filename The file that has the field/value pairs to use.

/uploadAttachment Specifies that files should be uploaded and attached to the work item.

/comment Specifies a comment to associate with the attachments.

commenttext The text for the comment.

filename The file that contains the text for the comment.

/recursive Include subdirectories when searching for files.

 

/downloadAttachment Specifies that attachments should be downloaded to the current path.

/path Specifies a path to download the files to

folder The folder to download files to.

 

workitemidN Specifies the id of the work item to retrieve.

fileN Represents the name of a file to upload. File patterns are supported (i.e. *.cs).

fileN Represents the name of a file to upload. File patterns are supported (i.e. *.cs).

filePatternN Represents the name of an attachment to download. File patterns are supported (i.e. *.cs).

 

/server:servername Specifies the URL of the Team Foundation server to connect to.

Example: /server:http://mytfsserver:8080/

Examples:

Creating a new Bug work item with a title of ‘New’ and assigned to Jason

tfpt workitem /new project1\Bug /fields:”Title=New;Assigned To=Jason”

 

Updating work item 123 with field values from a file

tfpt workitem /update 123 /fields:@myFieldValues.txt

 

Updating all work items assigned to me to be assigned to Jason (uses Query)

tfpt Query /format:id “project1\Team Queries\My Work Items” | tfpt workitem /update @ /fields:”Assigned To=Jason”

How To Permanently delete work item: TFS 2010 / 2008

Filed under: Team foundation server 2010 — Ravendra Mishra @ 3:23 pm

In order to delete/ destroy work items or work item types, you’ll need TFS 2008/2010 and you’ll need the respective version of Power Tools.

There are two commands:

DestroyWI: You can use this to destroy one or more work items.

DestroyWITD: You can use this to destroy an entire work item type — this means, you are destroying every work item of that type and the type itself.

Please note: Destroy means that you are permanently removing all trace of this work item/work item type from the operational store.  The work item data will still remain in the reporting warehouse.

In TFS 2008 you need to use TFS power tool commands (i.e. tfpt)

C:\Program Files\Microsoft Team Foundation Server 2008 Power Tools>tfpt destroywi /?

tfpt destroywi – Destroy one or more work items

Destroys a work item or work items. Currently, work items can only be destroyed. Destroying a work item means the work items is physically deleted and cannot be restored. The system does not support logical (and thus recoverable) deletion of work items.

Destroyed work items will remain in the data warehouse.

Usage: tfpt destroywi /server:tfsservername /workitemid:value1[,value2,…] [/noprompt]

/server Required. TFS server.

/workitemid Required. IDs of work items to destroy.

/noprompt If specified, does not ask for confirmation before destroying.

 

While In TFS 2010 you need to use witadmin commands

C:\Program Files\Microsoft Team Foundation Server 2010 Power Tools>witadmin destroywi /?

Work Item Tracking Administration tool. (C) Copyright 2006 Microsoft Corporation. All rights reserved.

Destroys a work item or work items. Currently, work items can only be destroyed. Destroying a work item means the work item is physically deleted and cannot be restored. The system does not support logical (and thus recoverable) deletion of work items.

Usage: witadmin destroywi /collection:collectionurl /id:id [/noprompt]

/collection Specifies the Team Foundation project collection. Use a fully specified URL such as http://servername:8080/tfs/Collection0.

/id Specifies the ID of the work item to destroy. Supports multiple IDs delimited by commas such as 12,15,23 (with no whitespace).

/noprompt Turns off the confirmation message.

How To Permanently Delete TFS Project

Filed under: Team foundation server 2010 — Ravendra Mishra @ 2:39 pm

Team foundation server projects can be permanently deleted. In case you delete the project from team explorer it wont be deleted at all, this wont show to your local team explorer view but it will remain in the database hence visible to other team members.

In case you want to delete it permanently then this can be done in following two ways. (This deletes the whole project; this process is not reversible. Before using these, make sure that all important data has been backed-up appropriately)

  1. Command line
  2. TFS Administrator console

Though data will remain in warehouse database, in case you want to delete entries from warehouse as well then rebuild the warehouse database.

  1. Command line

    TFSDeleteproject [/q] [/force] [/server:servername] team project name

Details at

Customizing existing work item template TFS 2010

Filed under: Team foundation server 2010 — Ravendra Mishra @ 1:51 pm

Individual work item templates of existing process template can be updated and uploaded back to TFS 2010 project collection. If you update complete process template and upload again it won’t take effect on existing projects, however new projects will use updated one.

In order to make changes on existing template individual work item templates need to be modified and uploaded. Steps will be as below

  1. Get latest version of work item template from server. You may use commands or power tools process template editor for this purpose.
  2. Modify downloaded template to make desired changes. You can do this either using any xml editor or TFS power tools process editor.
  3. Upload modified work item template.
  1. Get latest version of work item template from server

You may use commands for this purpose. To export or list work item types, you must be a member of the Readers group or have your View work items in this node permission set to Allow.

witadmin exportwitd /collection:CollectionURL /p:Project /n:TypeName [/f:FileName] [/e:Encoding] [/exportglobalists]

For further details on this refer the link below:

http://msdn.microsoft.com/en-us/library/dd312129.aspx

Or may use TFS power tools GUI installed with VS2010. Download and install TFS Power tools for Visual studio 2010 from http://visualstudiogallery.msdn.microsoft.com/en-us/3e8c9b68-6e39-4577-b9b7-78489b5cb1da

Navigate to export WIT as below

Then select the project and work item type you want to download.

  1. Modify downloaded template

Modify exported .xml file with any xml editor. I normally prefer Visual Studio IDE. Go to the section where you want to make changes.

In case I need to add new fields etc I prefer to use TFS power tools process editor, its much faster to do this task.

While if I have to add new states and transition etc I would prefer xml editor.

You can add new states as you can see in the picture above and transitions as shown in the picture below.

Save the changes, make sure xml file is valid.

  1. Upload modified template

Now final task is to upload modified template to the project where you want these changes to be effective. Again this step can be done either using commands or power tools GUI

witadmin importwitd /collection:CollectionURL [/p:Project] /f:FileName [/e:Encoding] [/v]

or

Speicify the modified file and the project where this modified work item template need to be uploaded.

In case this need to be uploaded on multiple projects then its better to create a batch file using witadmin commands and execute the batch file once.

June 1, 2010

Connect to TFS 2010 from Visual Studio 2008

Filed under: Team foundation server 2010 — Ravendra Mishra @ 3:56 pm

You don’t need to upgrade your code from .Net 3.5 to .Net 4.0 (So that you can open it in VS 2010) just because your project is moved to TFS 2010. VS 2008 with SP1 supports connecting TFS 2010. While adding a project from TFS 2010, Team foundation server name should include full path of the project collection.

i.e. http://<Server name>:<port number>/<virtual directory name>/<project collection name>

 

May 10, 2010

How to update the MSProject Field Mapping in TFS

Filed under: Team foundation server 2010 — Ravendra Mishra @ 1:36 pm

Below are the steps for How to update the MSProject Field Mapping in TFS.

Uploads or downloads the file that defines how fields are mapped between Microsoft Office Project and Team Foundation Server. To use this tool, you must be a member of either the Team Foundation Administrators group or the Project Administrators group for the team project that you specify.

Usage: TFSFieldMapping upload | download /collection:CollectionURI /teamproject:ProjectName /mappingfile:MappingFile

upload Uploads the field mapping file for the team project that you
specify.
download Downloads the field mapping file for the team project that you
specify.
CollectionURI The URI of the team project collection. http://ServerName:Port/VirtualDirectoryName/CollectionName.

Below are the example steps:

1. Download the MS Project field mapping file from TFS:

C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE>tfsfieldmapping  download /collection:”http://serverName:8080/tfs/tfs support” /teamproject:”tfs testing” /mappingfile:”c:\FileMapping.xml”

2. Update and save FileMapping.xml

3. Upload the MS Project field mapping file to TFS:

C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE>tfsfieldmapping  upload /collection:”http://serverName:8080/tfs/tfs support” /teamproject:”tfs testing” /mappingfile:”c:\FileMapping.xml”

Team foundation server 2010 warehouse rebuilt

Filed under: Team foundation server 2010 — Ravendra Mishra @ 12:55 pm

Few days ago suddenly I realised that warehouse database is not being synchronized with latest changes. Tried to rebuilt it using warehouse services. These can be found at url http://localhost:8080/tfs/teamfoundation/administration/v3.0/warehousecontrolservice.asmx of the TFS application server.

Though it didn’t work (This used to work). This time I got following when I checked for GetProcessingStatus

<?xml version=”1.0″ encoding=”utf-8″ ?>


<WarehouseProcessingStatus xmlns:xsd=”http://www.w3.org/2001/XMLSchema xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance xmlns=”http://schemas.microsoft.com/TeamFoundation/2005/06/Services/Controller/03“>


<RequestTimeUtc>2010-05-10T12:42:24.4621235Z</RequestTimeUtc>


<WarehouseProcessingOnlineStatus>Started</WarehouseProcessingOnlineStatus>


<AnalysisProcessingOnlineStatus>Started</AnalysisProcessingOnlineStatus>


<JobProcessingStatus>Idle</JobProcessingStatus>


<JobsRunning>0</JobsRunning>


<JobsQueued>0</JobsQueued>


<Instance Name=”TEAM FOUNDATION JobProcessingStatus=”Idle JobsRunning=”0 JobsQueued=”0“>


<Jobs>


<Job Name=”Full Analysis Database Sync JobProcessingStatus=”Idle“>


<LastRun QueueTimeUtc=”2010-05-10T01:00:00Z ExecutionStartTimeUtc=”2010-05-10T01:00:01.51Z EndTimeUtc=”2010-05-10T01:01:02.72Z Result=”Failed“>


<ResultMessage>[Full Analysis Database Sync]: —> AnalysisDatabaseProcessingType=Full. —> Microsoft.TeamFoundation.Server.WarehouseException: TF221122: An error occurred running job Full Analysis Database Sync for team project collection or Team Foundation server TEAM FOUNDATION. —> Microsoft.TeamFoundation.Server.WarehouseException: Failed to Process Analysis Database ‘Tfs_AnalysisServer’. —> Microsoft.TeamFoundation.Server.WarehouseException: Error during OLE DB operation. Error Code = 0xC1060000, External Code = 0x80004005: Login timeout expired HYT00 A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. 08001 SQL Server Network Interfaces: Error getting enabled protocols list from registry [xFFFFFFFF]. 08001. Errors in the high-level relational engine. A connection could not be made to the data source with the DataSourceID of ‘Tfs_AnalysisDataSource’, Name of ‘Tfs_TAnalysisDataSource’. Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of ‘Configuration’, Name of ‘Test Configuration’ was being processed. Errors in the OLAP storage engine: An error occurred while the ‘Configuration ID’ attribute of the ‘Test Configuration’ dimension from the ‘Tfs_Analysis’ database was being processed. Internal error: The operation terminated unsuccessfully. Internal error: The operation terminated unsuccessfully. Server: The operation has been cancelled. Error during OLE DB operation. Error Code = 0xC1060000, External Code = 0x80004005: Login timeout expired HYT00 A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. 08001 SQL Server Network Interfaces: Error getting enabled protocols list from registry [xFFFFFFFF]. 08001. Errors in the high-level relational engine. A connection could not be made to the data source with the DataSourceID of ‘Tfs_AnalysisDataSource’, Name of ‘Tfs_AnalysisDataSource’. Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of ‘Configuration’, Name of ‘Test Configuration’ was being processed. Errors in the OLAP storage engine: An error occurred while the ‘Configuration Name’ attribute of the ‘Test Configuration’ dimension from the ‘Tfs_Analysis’ database was being processed. Internal error: The operation terminated unsuccessfully. Internal error: The operation terminated unsuccessfully. Error during OLE DB operation. Error Code = 0xC1060000, External Code = 0x80004005: Login timeout expired HYT00 A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. 08001 SQL Server Network Interfaces: Error getting enabled protocols list from registry [xFFFFFFFF]. 08001. Errors in the high-level relational engine. A connection could not be made to the data source with the DataSourceID of ‘Tfs_AnalysisDataSource’, Name of ‘Tfs_AnalysisDataSource’. Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of ‘Result’, Name of ‘Test Result’ was being processed. Errors in the OLAP storage engine: An error occurred while the ‘Outcome’ attribute of the ‘Test Result’ dimension from the ‘Tfs_Analysis’ database was being processed. Internal error: The operation terminated unsuccessfully. Internal error: The operation terminated unsuccessfully. Error during OLE DB operation. Error Code = 0xC1060000, External Code = 0x80004005: Login timeout expired HYT00 A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online. 08001 SQL Server Network Interfaces: Error getting enabled protocols list from registry [xFFFFFFFF]. 08001. Errors in the high-level relational engine. A connection could not be made to the data source with the DataSourceID of ‘Tfs_AnalysisDataSource’, Name of ‘Tfs_AnalysisDataSource’. Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of ‘Result’, Name of ‘Test Result’ was being processed. Errors in the OLAP storage engine: An error occurred while the ‘Resolution State’ attribute of the ‘Test Result’ dimension from the ‘Tfs_Analysis’ database was being processed. Internal error: The operation terminated unsuccessfully. Internal error: The operation terminated unsuccessfully. at Microsoft.TeamFoundation.Warehouse.TFSOlapProcessComponent.ExecuteXmla(String finalXmla) at Microsoft.TeamFoundation.Warehouse.TFSOlapProcessComponent.ProcessOlap(AnalysisDatabaseProcessingType processingType, WarehouseChanges warehouseChanges) — End of inner exception stack trace — at Microsoft.TeamFoundation.Warehouse.TFSOlapProcessComponent.ProcessOlap(AnalysisDatabaseProcessingType processingType, WarehouseChanges warehouseChanges) at Microsoft.TeamFoundation.Warehouse.AnalysisDatabaseSyncJobExtension.RunInternal(TeamFoundationRequestContext requestContext, TeamFoundationJobDefinition jobDefinition, DateTime queueTime, String& resultMessage) at Microsoft.TeamFoundation.Warehouse.WarehouseJobExtension.Run(TeamFoundationRequestContext requestContext, TeamFoundationJobDefinition jobDefinition, DateTime queueTime, String& resultMessage) — End of inner exception stack trace —</ResultMessage>


</LastRun>


<NextRun
QueueTimeUtc=”2010-05-10T13:00:00Z JobState=”QueuedScheduled” />


</Job>


<Job Name=”Incremental Analysis Database Sync JobProcessingStatus=”Idle“>


<LastRun
QueueTimeUtc=”2010-05-10T12:32:11.053Z ExecutionStartTimeUtc=”2010-05-10T12:32:12.35Z EndTimeUtc=”2010-05-10T12:33:35.503Z Result=”Succeeded” />


<NextRun
QueueTimeUtc=”2010-05-10T13:02:11.053Z JobState=”QueuedScheduled” />


</Job>


</Jobs>

……

…..

So I tried another option to rebuild the warehouse database from scratch using “Team foundation server admin console” utility from application server box. Go to reporting section and click rebuild. This is supposed to rebuild Warehouse and Analysis database.

Using this step warehouse database was rebuilt successfully but Analysis database is not completely rebuild yet. I am able to see only “Team System” cube in the database. Though I am expecting at least five cubes in this database. So I went to Edit option of the above screen, Navigate to Analysis tab and specify new database name.

This step successfully created analysis database as expected with all the cubes etc. Surprisingly this step also changed report server data source connection definition as well and they are pointing to newly created database.

April 29, 2010

TFS Warehouse controller service

Filed under: Team foundation server 2010,TFS — Ravendra Mishra @ 11:10 am

Team foundation server 2010 warehouse controller services can be accessed from following link on TFS App server

http://<TFS App Server>:8080/tfs/teamfoundation/administration/v3.0/warehousecontrolservice.asmx

It gives following services in the list. Highlighted ones are specially useful to synchronize warehouse and olap databases.

Blog at WordPress.com.