tf400731: Only one Catalog resource of type 'Project Portal' can exist under 'Team Project'.

by Xavier Dilip Kumar 20. June 2013 13:14

Solution:

1. Remove the existing portal setting for team project as shown in the screenshort
2. Execute the following command to create a team project site

TFPT.EXE addprojectportal /collection:http://<server>:<port>/tfs/<TeamProjectCollection>

* /teamproject:<TeamProject> /processtemplate:"Microsoft Visual Studio Scrum 2.2"

 

Tags: , ,

SharePoint | TFS 2010 | TFS 2012

TF250061: The following site could not be attached to Team Foundation Server: The site is already associated with a team project on an installation of Team Foundation Server with a different ID.

by Xavier Dilip Kumar 20. June 2013 05:19

Explanation:

I had this problem when I migrated TFS 2010 collection to TFS 2012 instance and having the collection online on both TFS 2010 and TFS 2012 instances in parallel.

Solution:

To fix the problem, you need to disable the team project portal links either on TFS 2010 or TFS 2012 collection --> Team projects and run the SharePoint repair on the APP TIER using TFS administration console.

 Following are the steps I followed to fix the error in TFS 2012 instance

1. Open Team Explorer in Visual Studio --> Connect to TFS 2010 instance --> Select the team project that needs the fix --> goto "Portal Settings" --> Unchecked the "Enable Team Project Portal checkbox" --> click OK

 

 

2. Login to TFS 2012 App Tier --> Open TFS Administration console --> Select "Share Point Web Applications" --> Select the SharePoint URL --> click "Repair Connection" --> Repair option

All the permissions and connections to the team projects Share point sites should succeed.

(Optional)

3. Login to TFS 2010 App Tier --> Open TFS Administration console --> Select "Share Point Web Applications" --> Select the SharePoint URL --> click "Repair Connection" --> Repair option

All the permissions and connections to the team projects Share point sites should succeed.

 

Tags: , ,

SharePoint | TFS 2010 | TFS 2012

An error occurred while initializing a build for build definition xxx: There is not enough space on the disk

by Xavier Dilip Kumar 23. February 2013 13:33

Soultion
Follow the below steps on the build agents
• Go to Start->Programs->Microsoft Team Foundation Server 2010/ 2012 ->Team Foundation Administration Console
• Select a build agent and click Properties
• Change the working directory from to $(SystemDrive) to D:, E: etc depending upon the free disk drive

Tags: , ,

TFS | TFS 2010 | TFS 2012

TFS Service account permissions on Database

by Xavier Dilip Kumar 2. February 2013 13:15

Explanation

TFS Service account requires the follwoing permissions on TFS - Share Point DBs

APP Database  Roles & Permissions
SQL Server System Master Public and TFSExecRole
TFS Configuration Public and TFSExecRole
TFS Collection Public, db_datareader, db_datawriter, db_owner and TFSExecRole
TFS Warehouse Public, TFSExecRole and TfsWarehouseDataReader
SharePoint Configuration Public and  db_owner

Tags: ,

TFS | TFS 2010 | TFS 2012

TF26179 – Field Type 'TreePath' can be used only with System.AreaPath & System.IterationPath – not with custom fields

by Xavier Dilip Kumar 25. January 2013 14:20

The treepath field type supports only system.areapath and system.iterationpath and cannot be used for the custom fields. It’s a limitation

Tags:

TFS | TFS 2010 | TFS 2012

Access Denied: User xxx needs Checkin, CheckinOther permission(s)

by Xavier Dilip Kumar 1. January 2013 13:12

Explanation
The reason is that the build agent account doesn't have permission on your source tree to checkin other user's changes

Solution
You need to right click on the source tee in Source Control Explorer. Then click Properties and go to Security tab. You can then select the corresponding user of group and check the Allow checkbox for Check in other user’s changes.

Tags:

TFS | TFS 2010 | TFS 2012

How to increase work item attachments?

by Xavier Dilip Kumar 21. December 2012 13:54

Explanation:

The default value of work item attachments is 4KB.  Attachment size can be adjusted up to 2GB.

Solution:

Log in as TFS Admin on the TFS Application tier and use the following web services to increase the attachment size.

http://localhost:8080/tfs/<Collection Name>/WorkItemTracking/v1.0/ConfigurationSettingsService.asmx

Tags:

TFS | TFS 2010 | TFS 2012 | TFS 2013

How to cleanup/rebuild TFS server cache?

by Xavier Dilip Kumar 19. June 2012 20:10

Explanation

I have been in situation where the cache clean job doesn’t get enough time to clean up old cache data and the flow of TFS server cache is more than the cache clean up which leads to production server outage and performance issues. The workaround mentioned in this post is expensive! means, It will consume more server resource which will affect the TFS server performance.

The Cache Cleanup can take long time on a very large drive. I would recommand to go with the Recommanded Workaround without affecting the server performance rather than workaround.


Workaround

1. To redirect the cache to different drive

  • Create a new cache folder in the drive with more free space.
  • Open Properties dialog for the new cache folder
  • On the Security tab, choose Edit --> The Permissions dialog box opens.
  • Choose Add --> The Select Users, Computers, or Groups dialog box opens.
  • Add the local group TFS_APPTIER_SERVICE_WPG, and then choose OK.
  • Select the Modify check box, clear all other check boxes, and then choose OK.
  • Open <TFS Server InstallDIR>\Application Tier\Web Services\web.config file
  • Add a line to the appSettings section

              <add key="dataDirectory" value="new cache folder" />

  • Save and close the web.config file.
  • Wait for sometime (may be 2 mins) for new setting in web.config to take effect
  • Delete the old cache root folder

2. To change Cache Settings limits

  • Open <TFS Server InstallDIR>\Application Tier\Web Services\web.config file

          To specify a percentage of available disk space to fill before old files are removed, add the PercentageBasedPolicy element.

              <add key="PercentageBasedPolicy" value="60" />

          To specify a fixed size in MB for the cache to reach before old files are removed, add the FixedSizeBasedPolicy element.

              <add key="FixedSizeBasedPolicy" value="500" />

          To change the amount of cache to free when removing old files, add the CacheDeletionPercent element.

              <add key="CacheDeletionPercent" value="50" />

  • Save and close the web.config file.
  • Wait for sometime (may be 2 mins) for new setting in web.config to take effect

Example


<appSettings>
        <add key="applicationDatabase" value="Data Source=dbserverhere;Initial Catalog=Tfs_Configuration;Integrated Security=True;" />
        <add key="WorkItemTrackingCacheRoot" value="C:\Windows\Temp\TFTemp" />
        <add key="traceWriter" value="false" />
        <add key="traceDirectoryName" value="%TEMP%\\TFLogFiles" />
        <add key="applicationId" value="GUID here" />
        <!-- The new cache folder location. -->
        <add key="dataDirectory" value="new cache folder" />
        <!-- The cache should fill up to 60% capacity of available disk space before old files are removed.-->
 <add key="PercentageBasedPolicy" value="60" />
        <!-- The cache should reach 500 MB before old files are removed. -->
 <add key="FixedSizeBasedPolicy" value="500" />
        <!-- To free 50% of the cache when removing old files -->
 <add key="CacheDeletionPercent" value="50" />
</appSettings>


Thinks to know

The default is CacheLimitPercent = 75%
If both CacheLimitPercent and FixedSizeBasedPolicy are set, FixedSizeBasedPolicy wins.
If CacheDeletionPercent is not set, it defaults to 20%
Default cache location:  \%programfiles%\Microsoft Team Foundation Server <Version>\Application Tier\Web Services\_tfs_data

Recommanded Workaround without affecting the server performance

1. To Rebuild the cache without changing Cache Settings limits

  • Create a temp cache folder in the drive with more free space.
  • Open Properties dialog for the new cache folder
  • On the Security tab, choose Edit --> The Permissions dialog box opens.
  • Choose Add --> The Select Users, Computers, or Groups dialog opens.
  • Add the local group TFS_APPTIER_SERVICE_WPG, and then choose OK.
  • Select the Modify check box, clear all other check boxes, and then choose OK.
  • Open <TFS Server InstallDIR>\Application Tier\Web Services\web.config file
  • Comment dataDirectory element if already exist

              <!-- <add key="dataDirectory" value="Current cache folder" /> -->

              Note: Default cache location:  <TFS Server InstallDIR>\Version Control Proxy\Web Services\VersionControlProxy\Data

  • Add a line to the appSettings section

              <add key="dataDirectory" value="temp cache folder" />

  • Save and close the web.config file.
  • Wait for sometime (may be 2 mins) for new setting in web.config to take effect
  • Delete the content in current cache folder (Note: Do not delete the current cache folder, Only the folders and files inside current cache folder should be deleted)
  • Open <TFS Server InstallDIR>\Application Tier\Web Services\web.config file
  • Comment (temp) dataDirectory element

             <!-- <add key="dataDirectory" value="temp cache folder" /> -->

  • UnComment dataDirectory element if already exist

             <add key="dataDirectory" value="Current cache folder" />

             Note: Default cache location: <TFS Server InstallDIR>\Version Control Proxy\Web Services\VersionControlProxy\Data

  • Save and close the web.config file.
  • Wait for sometime (may be 2 mins) for new setting in web.config to take effect

Tags: ,

TFS | TFS 2010 | TFS 2012

About the author

My name is Xavier Dilip Kumar Jayaraj and I am a Software Configuration Management Engineer with a background in application development, Build & packaging using Install Shield.

Profile in LinkedIn

  

Quotes I Like

"Failure will never overtake me if my determination to succeed is strong enough."  - Dr. APJ. Abdul Kalam

"Always be yourself, express yourself, have faith in yourself, do not go out and look for a successful personality and duplicate it." - Bruce Lee

"Technology is just a tool. In terms of getting the kids working together and motivating them, the teacher is the most important." - Bill Gates

"Innovation distinguishes between a leader and a follower." - Steve Jobs

Disclaimer

The information provided here is based on my expreriences, troubleshooting and online/offline findings. It can be used as is on your own risk without any warranties and I impose no rights.

Month List