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>"
tfsdeleteproject /q /force /server:<tfs server> "<project name>"
Add the below keyAnd hit Retry on the Error message.
<add key="<DomainFullyQualifiedPath>" value="dcHostName" />

<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>