Showing posts with label TFS 2008. Show all posts
Showing posts with label TFS 2008. Show all posts

Wednesday, May 27, 2009

Delete a Team Project

One of the new team members accidently created a team project (Remiss of the administrator for giving him full control).
Found out a way to delete the team project
Open a command line on your team foundation server and cd to
drive:/%program files%\Microsoft Visual Studio 9.0\Common7\IDE (For VSTS 2008)
tfsdeleteproject /q /force /server:<tfs server> "<project name>"

Monday, May 25, 2009

Restoring TFS 2008

I am sure everyone will be taking backup of their TFS on regular basis. Being new to TFS I thought to try and restore the TFS on a new machine, to avoid the risk of not taking backup of anything.

I had a spare PC in which I installed the trial of TFS. the environment of the new machine was now exactly the same as that of the old (or existing)machine.
The link which helped me for this was
http://msdn.microsoft.com/en-us/library/ms404869.aspx

Friday, May 22, 2009

Error 28002 : Unknown Error

This was the forth time I was installing TFS 2008 and I got this error for the first time. It has to do with the DNS. TFS is not able to resolve the Domain Name as a result of which it gives TFS3010 (if you see the Event log).
Resolution:
1. Open the web.config from the path below (TFS Root)
%systemdrive%/Program Files\Microsoft Visual Studio 2008 Team Foundation Server/Web Services/Web.config
Add the below key
<add key="<DomainFullyQualifiedPath>" value="dcHostName" />
And hit Retry on the Error message.

Wednesday, May 6, 2009

SharePoint Access rights management

For managing the sharepoint access rights for users of TFS follow the following steps.
1. In Team Explorer right click on the Team Project for which you want to give access rights and select Securiy menu item.


2. In the screen displayed click on the Windows Sharepoint Services Site Administration link.
Note: The credentials of the user doing this changes should have the administrator privilages for sharepoint.

3. Internet explorer will be displayed in which you will be able manage rights for groups and individuals. You also will be add/remove users from a group.

Monday, April 20, 2009

Add Check-in Policy

The Check-in policy can be added at Team Project level. Below are the steps.
1. Open the Team Explorer
2. Select the Team Project
3. Right Click -> Source Control


4. Click on Check-in Policy Tab
5. Click on Add button.
You will get the options as above if you have installed PowerTools, otherwise 4 options will be displayed
1. Builds
2. Code Analysis
3. Testing Policy
4. Work Items

Tuesday, March 17, 2009

Add/Modify Area & Iteration

Atlast I found it!!


I was searching for a option to add Area or Iteration to my Project. I had one option in my WebAccess portal of my Team Project but that didnt reflect in my Creat New work item Classification block.


Searched many things but didnt get any help. (the option is obvious but didnt get any help)


It can be done as below.










Monday, February 9, 2009

Continuous Integration - Force a build to fail when unit tests fail and create work item



I had to setup continuous build on my TFS2008 machine which had to run a specific set of tests before it created a build (whenever anyone check’s in any code). I was pretty much successful doing that. The process was running smooth but whenever a test used to fail the build used to “Partially Fail” and also it didn’t create a “Bug” and assign it to the person who broke the build. A Bug was assigned to the person who broke the build only when the build used to “Fail”.
I did some RnD in this and figured out a way to force a build to fail whenever a test failed. I wrote the below line in the TFSBuild.proj file

< treattestfailureasbuildfailure > true < /treattestfailureasbuildfailure >
Adding this I thought, as I am forcing the test fail to be treated as a Build Failure, TFS will take care of raising a work item or Bug to the person but it didn’t.
Then I wrote a Target in the same file to create a work item on Test failure.



<UsingTask TaskName="Microsoft.TeamFounadtion.Build.Tasks.CreateNewWorkItem"

AssemblyFile="$(TeamBuildRefPath)\Microsoft.TeamFoundation.Build.Tasks.VersionControl.dll" />


<Target Name="AfterTest">

<!-- Refresh the build properties. -->

<GetBuildProperties TeamFoundationServerUrl="$(TeamFoundationServerUrl)"

BuildUri="$(BuildUri)"

Condition=" '$(IsDesktopBuild)' != 'true' ">

<Output TaskParameter="TestSuccess" PropertyName="TestSuccess" />

</GetBuildProperties>

<!-- Set CompilationStatus to Failed if TestSuccess is false. -->

<SetBuildProperties TeamFoundationServerUrl="$(TeamFoundationServerUrl)"

BuildUri="$(BuildUri)"

CompilationStatus="Failed"

Condition=" '$(IsDesktopBuild)' != 'true' and '$(TestSuccess)' != 'true' ">

</SetBuildProperties>

<CreateNewWorkItem

BuildNumber="$(BuildNumber)"

BuildURi="$(BuildURI)"

Description="The CreateNewWorkItem task created this bug."

TeamProject="$(TeamProject)"

TeamFoundationServerUrl="$(TeamFoundationServerUrl)"

Title="Unit Test Failure in $(BuildNumber)"

WorkItemFieldValues="$(WorkItemFieldValues)"

WorkItemType="$(WorkItemType)"

Condition=" '$(IsDesktopBuild)' != 'true' and '$(TestSuccess)' != 'true' ">

</CreateNewWorkItem>

</Target>

Monday, January 19, 2009

LoadTest Controller

I was in the process of exploring Controller and Agent for Load testing using VSTS 2008. I am facing an issue in the same

"Failed to connect to remote Controller on machine 'tfs_Server', port '6901': No connection could be made because the target machine actively refused it ."

In the process of troubleshooting the problem, I read in one of theblogs is to install Visual Studio 2008 SPI in all the machines involved. i.e Controller, Agent and Client

In my scenario my Controller and TFS Server was the same machine.
I installed it on all machine but after I installed it on my controller machine, I was then not able to connect to my TFS Server from any of my clients.
I got the error below on all my client machines

"TF31001: Team Foundation cannot retrieve the list of team projects from Team Foundation Server tfserver. The Team Foundation Server returned the following error: Team Foundation services are not available from the server.
Technical information (for administrator):
TF30059: Fatal error while initializing web service.
"

Then I unstalled the SPI from the machine and then was able to successfully connect to the TFS Server

One more problem I faced then was I was getting error as below when I run my Load test.

"No connection could be made because the target machine actively refused it "
On going to the Controller machine and checking the services, the service for the controller was stopped. I tried to start the service manually but then the service stopped by itself giving me a message.

"The Visual Studio Team Test Controller Service on Local Computer started and then stopped. Some services stop automatically if they have no work to do, for example, the Performance Logs and Alerts service. "

Then I realised that the whole problem was caused because my controller was a 90 Day or 25 Test Run trial.