Niraj Bhatt – Architect’s Blog

Ruminations on .NET, Architecture & Design

TFS Common issues

Below are few issues which I guess one would run into on their first usage of TFS & Team Explorer.

1) Permanently deleting Dummy Projects: After playing around for a while there would few dummy Team Projects created. By default TFS uses a soft delete. For permanent (hard) delete one can use tf command line utility with destroy option (TFS 2008).

Note if you have deleted a project already you need to undelete it & check in pending changes. Destroy doesn’t work on deleted projects. Also the folder you are trying to delete should be mapped to a workspace (File -> Source Control ->Workspaces…)

E.g. tf destroy $/YourProjectName/SubFolder/… (for other options check out tf destroy /?)

2) Logging in as a different user: By default VS.NET would ask you credentials to connect to TFS every time you run it. You can avoid it by caching required credentials. To cache your credentials go to Control Panel -> User Accounts -> Manage your network password (left column) -> Click Add to add the required details. Once added VS.NET won’t trouble you for credentials.

3) Deleting a workspace: Workspace belongs to a owner (authenticated user by TFS). Let’s say you have logged in as Admin & set your working folder to C:\WorkingFolder. Now you want to log on TFS as local user (without admin rights) & use the same mapped path (C:\WorkingFolder). TFS at this level would complain Admin is already using that location, hence you can’t use it. In order to remove workspace created by Admin you again need to fallback on tf utility.

E.g. tf workspace /delete MyWorkspace;MyDomain\Admin /server:http://MyTFS:8080/

4) Automatic Check Out – not working: If you go to VS.NET Tools -> Options -> Source Control -> Environment, you will see 2 drop downs there. There is one which reads Editing – Check Out Automatically. What this means is when you have a opened project & you edit files using Solution Explorer those would be checked out automatically. But sometimes you won’t find it working. A possible reason, your solution is not binded to source control. To regain the bindings click on File -> Source Control -> Change Source Control (N.B. At this point of time Source Control explorer should be closed). There you will a list of your projects & solutions. Select them & click on bind button on the tool bar window. Things would start working now as expected.

Hope above saves your hair :) .

July 21, 2008 Posted by nirajrules | Team Foundation Server | , | 1 Comment

Installing Team Foundation Server (TFS) on Windows 2008

I guess this isn’t that difficult provided you have the right guidance. A very good link is available here though where I spent most of the time was how to do the steps identified. So thought of pitching in with my experience along with some images :) .

1) If you start installing TFS without worrying about anything you will bump into error TF220059 (More info). To resolve this you need to ensure that IIS is installed on Win2K8 machine, along with SQL SERVER 2005 (Reporting Services) + SQL SERVER 2005 (SP2). If you installed SQL 2005 + SP2 without IIS, you don’t have uninstall everything. Install IIS & re run SQL 2005 & SP2 just to install reporting services.
 

To install IIS you can use Service Manager (Control Panel) (N.B. You need to select Sub options, refer to first link at the begining of the post). After install you should see something as below:
 


 

2) Next you need to create 3 AD Accounts (I had LDAP Linux which TFS doesn’t seem to support :( ) TFSSetup, TFSService & TFSReports.
 

3) You need to manually install Sharepoint Services for Win2K8 (unlike Win2K3). This requires a prior installation of .NET 3.0. Don’t look around as .NET 3.0 is very much provided with Win2K8 all you need is to install that Feature through Service Manager (Control Panel). After installation you would see,
 


 

4) Follow TFS installation guide steps for Sharepoint. Keep the Sharepoint port number handy as you will need it frequently. You would require that during installation of TFS.
 

5) Install TFS which seems like straight forward installation bearing time taken for system check :) . This installation along with other things creates the required database & web services.
 

6) Install TFC on your client machine which has VS2008 (TFC is a sub folder bundled with TFS). Open up VS.NET 2008 -> View -> Team Explorer, try connecting to your server using port 8080 & bang. I ran into error – TF31003. Good way to rectify this error on your client, is go the server where you just installed TFS. Open inetmgr & try to browse through one of the installed web services.

Although I was able to browse in my case the client wasn’t working. The problem for me was the proxy configuration, as every HTTP request went via it. I went to IE -> Tools -> Options & configured to bypass proxy when a HTTP request was made to TFS Server. This did the trick for me.

Finally I got all up & running :) .

July 18, 2008 Posted by nirajrules | Team Foundation Server | , | 2 Comments