Can anyone tell me how to build using Team Builds No matter how I tries, my build ends with an error.
Arild
Attaching the error log and .proj file.
Build started 13.10.2005 10:57:01.
__________________________________________________
Project "c:\data\components\duplo\Duplo\Test2\BuildType\TFSBuild.proj" (EndToEndIteration target(s)):
Target InitializeEndToEndIteration:
Target CoreClean:
Removing directory "c:\data\components\duplo\Duplo\Test2\BuildType\..\Sources".
Target InitializeBuild:
Creating directory "c:\data\components\duplo\Duplo\Test2\BuildType\..\Sources".
Creating directory "\\192.168.3.20\data\builds\duplo\Test2_20051013.6".
Target InitializeWorkspace:
Workspace DUPLO does not exist.
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(276,5): error : The working folder C:\Data is already in use by another workspace on this computer.
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(276,5): error MSB4018: The "CreateWorkspaceTask" task failed unexpectedly.
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(276,5): error MSB4018: Microsoft.TeamFoundation.VersionControl.Client.WorkingFolderInUseException: The working folder C:\Data is already in use by another workspace on this computer. ---> System.Web.Services.Protocols.SoapException: The working folder C:\Data is already in use by another workspace on this computer.
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(276,5): error MSB4018: --- End of inner exception stack trace ---
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(276,5): error MSB4018: at Microsoft.TeamFoundation.VersionControl.Client.Repository.ProcessHttpResponse(HttpWebResponse response, Stream responseStream, WebException webException, XmlReader& xmlResponseReader)
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(276,5): error MSB4018: at Microsoft.TeamFoundation.VersionControl.Client.Repository.ExecWebServiceRequest(HttpWebRequest request, XmlWriter requestXml, HttpWebResponse& response)
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(276,5): error MSB4018: at Microsoft.TeamFoundation.VersionControl.Client.Repository.CreateWorkspace(Workspace workspace)
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(276,5): error MSB4018: at Microsoft.TeamFoundation.VersionControl.Client.Client.CreateWorkspace(Workspace workspace)
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(276,5): error MSB4018: at Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer.CreateWorkspace(String name, String owner, String comment, WorkingFolder[] mappings)
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(276,5): error MSB4018: at Microsoft.TeamFoundation.Build.Tasks.CreateWorkspaceTask.Execute()
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(276,5): error MSB4018: at Microsoft.Build.BuildEngine.TaskEngine.ExecuteTask(ExecutionMode howToExecuteTask, Hashtable projectItemsAvailableToTask, BuildPropertyGroup projectPropertiesAvailableToTask, Boolean& taskClassWasFound)
Done building target "InitializeWorkspace" in project "TFSBuild.proj" -- FAILED.
Done building project "TFSBuild.proj" -- FAILED.
Build FAILED.
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(276,5): error : The working folder C:\Data is already in use by another workspace on this computer.
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(276,5): error MSB4018: The "CreateWorkspaceTask" task failed unexpectedly.
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(276,5): error MSB4018: Microsoft.TeamFoundation.VersionControl.Client.WorkingFolderInUseException: The working folder C:\Data is already in use by another workspace on this computer. ---> System.Web.Services.Protocols.SoapException: The working folder C:\Data is already in use by another workspace on this computer.
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(276,5): error MSB4018: --- End of inner exception stack trace ---
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(276,5): error MSB4018: at Microsoft.TeamFoundation.VersionControl.Client.Repository.ProcessHttpResponse(HttpWebResponse response, Stream responseStream, WebException webException, XmlReader& xmlResponseReader)
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(276,5): error MSB4018: at Microsoft.TeamFoundation.VersionControl.Client.Repository.ExecWebServiceRequest(HttpWebRequest request, XmlWriter requestXml, HttpWebResponse& response)
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(276,5): error MSB4018: at Microsoft.TeamFoundation.VersionControl.Client.Repository.CreateWorkspace(Workspace workspace)
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(276,5): error MSB4018: at Microsoft.TeamFoundation.VersionControl.Client.Client.CreateWorkspace(Workspace workspace)
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(276,5): error MSB4018: at Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer.CreateWorkspace(String name, String owner, String comment, WorkingFolder[] mappings)
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(276,5): error MSB4018: at Microsoft.TeamFoundation.Build.Tasks.CreateWorkspaceTask.Execute()
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(276,5): error MSB4018: at Microsoft.Build.BuildEngine.TaskEngine.ExecuteTask(ExecutionMode howToExecuteTask, Hashtable projectItemsAvailableToTask, BuildPropertyGroup projectPropertiesAvailableToTask, Boolean& taskClassWasFound)
0 Warning(s)
2 Error(s)
Time Elapsed 00:00:00.53
TFSBuild.proj:
<
xml version="1.0" encoding="utf-8" ><
Project DefaultTargets="DesktopBuild" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"><!--
TO EDIT BUILD TYPE DEFINITIONTo edit the build type, you will need to edit this file which was generated
by the Create New Build Type wizard. This file is under source control and
needs to be checked out before making any changes.
The file is available at -
$/{TeamProjectName}/TeamBuildTypes/{BuildTypeName}
where you will need to replace TeamProjectName and BuildTypeName with your
Team Project and Build Type name that you created
Checkout the file
1. Open Source Control Explorer by selecting View -> Other Windows -> Source Control Explorer
2. Ensure that your current workspace has a mapping for the $/{TeamProjectName}/TeamBuildTypes folder and
that you have done a "Get Latest Version" on that folder
3. Browse through the folders to {TeamProjectName}->TeamBuildTypes->{BuildTypeName} folder
4. From the list of files available in this folder, right click on TfsBuild.Proj. Select 'Check Out For Edit...'
Make the required changes to the file and save
Checkin the file
1. Right click on the TfsBuild.Proj file selected in Step 3 above and select 'Checkin Pending Changes'
2. Use the pending checkin dialog to save your changes to the source control
Once the file is checked in with the modifications, all future builds using
this build type will use the modified settings
--><!--
Do not edit this --><
Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets" /><
ProjectExtensions><!--
DESCRIPTIONThe description is associated with a build type. Edit the value for making changes.
--><
Description></
Description><!--
BUILD MACHINEName of the machine which will be used to build the solutions selected.
--><
BuildMachine>duplo</BuildMachine></
ProjectExtensions><
PropertyGroup><!--
TEAM PROJECTThe team project which will be built using this build type.
--><
TeamProject>Duplo</TeamProject><!--
BUILD DIRECTORYThe directory on the build machine that will be used to build the
selected solutions. The directory must be a local path on the build
machine (e.g. c:\build).
--><
BuildDirectoryPath>c:\data\components\duplo</BuildDirectoryPath><!--
DROP LOCATIONThe location to drop (copy) the built binaries and the log files after
the build is complete. This location has to be a valid UNC path of the
form \\Server\Share. The build machine service account and application
tier account need to have read write permission on this share.
--><
DropLocation>\\192.168.3.20\data\builds\duplo</DropLocation><!--
TESTINGSet this flag to enable/disable running tests as a post build step.
--><
RunTest>false</RunTest><!--
WorkItemFieldValuesAdd/edit key value pairs to set values for fields in the work item created
during the build process. Please make sure the field names are valid
for the work item type being used.
--><
WorkItemFieldValues>Priority=1;Severity=1</WorkItemFieldValues><!--
CODE ANALYSISTo change CodeAnalysis behavior edit this value. Valid values for this
can be Default,Always or Never.
Default - To perform code analysis as per the individual project settings
Always - To always perform code analysis irrespective of project settings
Never - To never perform code analysis irrespective of project settings
--><
RunCodeAnalysis>Never</RunCodeAnalysis><!--
UPDATE ASSOCIATED WORK ITEMSSet this flag to enable/disable updating associated workitems on a successful build
--><
UpdateAssociatedWorkItems>true</UpdateAssociatedWorkItems></
PropertyGroup><
ItemGroup><!--
SOLUTIONSThe path of the solutions to build. To add/delete solutions, edit this
value. For example, to add a solution MySolution.sln, add following line -
<SolutionToBuild Include="$(SolutionRoot)\path\MySolution.sln" />
To change the order in which the solutions are build, modify the order in
which the solutions appear below.
--><
SolutionToBuild Include="$(SolutionRoot)\Duplo\Duplo.sln" /></
ItemGroup><
ItemGroup><!--
CONFIGURATIONSThe list of configurations to build. To add/delete configurations, edit
this value. For example, to add a new configuration, add following lines -
<ConfigurationToBuild Include="Debug|x86">
<FlavorToBuild>Debug</FlavorToBuild>
<PlatformToBuild>x86</PlatformToBuild>
</ConfigurationToBuild>
The Include attribute value should be unique for each ConfigurationToBuild node.
--><
ConfigurationToBuild Include="Debug|Any CPU"><
FlavorToBuild>Debug</FlavorToBuild><
PlatformToBuild>Any CPU</PlatformToBuild></
ConfigurationToBuild></
ItemGroup><
ItemGroup><!--
TEST ARGUMENTSIf the RunTest is set to true then the following test arguments will be
used to run tests.
To add/delete new testlist or to choose a metadata file (.vsmdi) file, edit this value.
For e.g. to run BVT1 and BVT2 type tests mentioned in the Helloworld.vsmdi file, add the following -
<MetaDataFile Include="$(SolutionRoot)\HelloWorld\HelloWorld.vsmdi">
<TestList>BVT1;BVT2</TestList>
</MetaDataFile>
Where BVT1 and BVT2 are valid test types defined in the HelloWorld.vsmdi file.
MetaDataFile - Full path to test metadata file.
TestList - The test list in the selected metadata file to run.
Please note that you need to specify the vsmdi file relative to $(SolutionRoot)
--><
MetaDataFile Include=" "><
TestList> </TestList></
MetaDataFile></
ItemGroup><
ItemGroup><!--
ADDITIONAL REFERENCE PATHThe list of additional reference paths to use while resolving references.
For example,
<AdditionalReferencePath Include="C:\MyFolder\" />
<AdditionalReferencePath Include="C:\MyFolder2\" />
--></
ItemGroup></
Project>
Team Build Server error
RotcivL
Seems like, there is already a workspace existing with c:\data folder mapped. Have you tried removing that workspace or removing the mapping from that workspace Or, you may use a different build directory and build with that.
Paxxer
I have been working with the other reply I received, that suggested to remove all workspaces, and in fact it worked. Then I changed the Team Build Service account back to tfsservice, and all goes wrong again. Then I once more removed all workspaces, and things starts to work again.
To me it looks like the workspaces must be owned/created by the account running the Team Build service. Can You confirm that this observation is correct or am I way off
Arild
zot166249
The build process first checks the build directory for a pre-existing workspace. If there is one:
1. If it is owned by the current account running the build service, this workspace is deleted and a new one created in its place
2. If it is owned by another user (which can happen if your previous build was run with a different build service account) then an error pops up. In this case, you can either choose a different build directory or delete the workspaces created by the previous user manually.
Please let me know if you need any info.
adam74
What about using Team Explorer logged on as different user than tfsservice on the same server as running the Team Build service
Will we be able to solve this problem now or sometime in the future
Is the only workaround to only use Team Explorer when logged in as tfsservice
Arild
Mr Dawson
Thanks for your interest in Team Build.
- Anu
pambear
I believe I have tried all of the workaround mentioned, and it did not help.
I am not sure if tried one of theml, since I did not find out how to set Log on as service priviledge for the tfsservice account.
On the other hand. When I changed users I between tfsservice and tfssetup, I was told that tfssetup was granted Log On as service right, but not when I changed back to tfsservice. Does this indicate that tfsservice had Log on to a service priviledge already set
If so, I did try all the workarounds, with no success.
Arild
Sharad Cornejo - MSFT
1. Change the build service account to the tfsservice account
2. Logon as the build service account and open a VS command prompt
3. Navigate to the build directory that you are trying to build from
4. Type "tf workspaces remove:*" and confirm deletion of all workspaces
5. Kick off build again on the same build directory
Please let me know if this works. You might also try to kick off build on a build directory that does not exist on your hard drive as an alternative.
Either way please post the build log so that it helps me debug the issue.
ivernot
Thanx Any

Yes you did
Arild
Andzej
Did I answer your query
-Anu