Team Build Desktop Build problems

I referenced the How to: Build Team Projects on a Desktop but the how to is incomplete and I'm getting some errors that I hope that someone can help with this one.

I have a project, I created the Build Type, I sync'd with the local drive. So far everything is fine. I ran MSBuild (from the directory with the Build Type) and set the SolutionRoot to the full path of my solution (relative paths didn't seem to work at all). I did not set the TeamBuildRefPath because I can't find any documentation on it so I'm not sure what it should be. I keep getting the following error: MSB1008 only one project can be specified

Swtich: and

That's it. The process stops at this point. i've tried variations on this but still can't get it to work.

Jeff



Answer this question

Team Build Desktop Build problems

  • scylla

    Hi. Yes, I'm working in the VS Command Prompt environment. Here is the TFSBuild.proj file. If you need anything else, please let me know.

    < xml version="1.0" encoding="utf-8" >
    <Project DefaultTargets="DesktopBuild" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <!-- TO EDIT BUILD TYPE DEFINITION

    To 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>
    <!-- DESCRIPTION
    The description is associated with a build type. Edit the value for making changes.
    -->
    <Description>Builds and tests just the service portion of the effort tracking project.</Description>
    <!-- BUILD MACHINE
    Name of the machine which will be used to build the solutions selected.
    -->
    <BuildMachine>mcsd-dev</BuildMachine>
    </ProjectExtensions>
    <PropertyGroup>
    <!-- TEAM PROJECT
    The team project which will be built using this build type.
    -->
    <TeamProject>Effort Tracking</TeamProject>
    <!-- BUILD DIRECTORY
    The 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:\Effort Tracking Builds</BuildDirectoryPath>
    <!-- DROP LOCATION
    The 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>\\mcsd-server\Builds</DropLocation>
    <!-- TESTING
    Set this flag to enable/disable running tests as a post build step.
    -->
    <RunTest>true</RunTest>
    <!-- WorkItemFieldValues
    Add/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>Symptom=build break;Steps To Reproduce=Start the build using Team Build</WorkItemFieldValues>
    <!-- CODE ANALYSIS
    To 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>Default</RunCodeAnalysis>
    <!-- UPDATE ASSOCIATED WORK ITEMS
    Set this flag to enable/disable updating associated workitems on a successful build
    -->
    <UpdateAssociatedWorkItems>true</UpdateAssociatedWorkItems>
    <!-- Title for the work item created on build failure -->
    <WorkItemTitle>Build failure in build:</WorkItemTitle>
    <!-- Description for the work item created on build failure -->
    <DescriptionText>This work item was created by Team Build on a build failure.</DescriptionText>
    <!-- Text pointing to log file location on build failure -->
    <BuildlogText>The build log file is at:</BuildlogText>
    <!-- Text pointing to error/warnings file location on build failure -->
    <ErrorWarningLogText>The errors/warnings log file is at:</ErrorWarningLogText>
    </PropertyGroup>
    <ItemGroup>
    <!-- SOLUTIONS
    The 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)\EffortTrackingSolution\EffortTrackingSolution.sln" />
    </ItemGroup>
    <ItemGroup>
    <!-- CONFIGURATIONS
    The 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="Release|Mixed Platforms">
    <FlavorToBuild>Release</FlavorToBuild>
    <PlatformToBuild>Mixed Platforms</PlatformToBuild>
    </ConfigurationToBuild>
    </ItemGroup>
    <ItemGroup>
    <!-- TEST ARGUMENTS
    If 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="$(SolutionRoot)\EffortTrackingSolution\EffortTrackingSolution.vsmdi">
    <TestList>Read Tests</TestList>
    </MetaDataFile>
    </ItemGroup>
    <ItemGroup>
    <!-- ADDITIONAL REFERENCE PATH
    The list of additional reference paths to use while resolving references.
    For example,
    <AdditionalReferencePath Include="C:\MyFolder\" />
    <AdditionalReferencePath Include="C:\MyFolder2\" />
    -->
    </ItemGroup>
    </Project>


  • tommyitvn

    hello Jeff: how exactly did you set the SolutionRoot in your TFSBuild.proj file I've been thrashing around on the syntax for a while and i'm reduced to asking complete strangers for help...
  • JOD

    What is the command line you are using

    Is simple -

    msbuild TFSBuild.proj

    not working You need to execute that from the local folder mapped to TeamBuildTypes\<YourBuildType> server folder where TFSBuild.proj is there. This is assuming EffortTrackingSolution directory and TeamBuildTypes directory are siblings.

    If that is not the case, you can execute it like -

    msbuild /p:SolutionRoot=<path to parent of EffortTrackingSolution> TFSBuild.proj

    Let me know if this also doesn't work.

    Thanks,

    Gautam


  • Krishna Govindayapalli

    Gautam, here is the syntax I'm using and the exact results for each try.

    Simple:

    C:\Documents and Settings\jxl0575\My Documents\Visual Studio 2005\Projects\Effor
    tTrackingSolution\TeamBuildTypes\Effort Tracking Service Build>msbuild tfsbuild.proj
    Microsoft (R) Build Engine Version 2.0.50727.42
    [Microsoft .NET Framework, Version 2.0.50727.42]
    Copyright (C) Microsoft Corporation 2005. All rights reserved.

    Build started 2/21/2006 1:49:23 PM.
    __________________________________________________
    Project "C:\Documents and Settings\jxl0575\My Documents\Visual Studio 2005\Proje
    cts\EffortTrackingSolution\TeamBuildTypes\Effort Tracking Service Build\tfsbuild
    .proj" (default targets):

    Target CoreCompile:
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.Tea
    mFoundation.Build.targets(478,5): error MSB3202: The project file "C:\Documents
    and Settings\jxl0575\My Documents\Visual Studio 2005\Projects\EffortTrackingSolu
    tion\TeamBuildTypes\Effort Tracking Service Build\..\..\EffortTrackingSolution\E
    ffortTrackingSolution.sln" was not found.
    Done building target "CoreCompile" in project "tfsbuild.proj" -- FAILED.

    Done building project "tfsbuild.proj" -- FAILED.

    Build FAILED.
    C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFou
    ndation.Build.targets(478,5): error MSB3202: The project file "C:\Documents and
    Settings\jxl0575\My Documents\Visual Studio 2005\Projects\EffortTrackingSolution
    \TeamBuildTypes\Effort Tracking Service Build\..\..\EffortTrackingSolution\Effor
    tTrackingSolution.sln" was not found.
    0 Warning(s)
    1 Error(s)

    Time Elapsed 00:00:00.04

    C:\Documents and Settings\jxl0575\My Documents\Visual Studio 2005\Projects\Effor
    tTrackingSolution\TeamBuildTypes\Effort Tracking Service Build>

    Complex Failure

    C:\Documents and Settings\jxl0575\My Documents\Visual Studio 2005\Projects\Effor
    tTrackingSolution\TeamBuildTypes\Effort Tracking Service Build>msbuild /p:Soluti
    onRoot=C:\Documents and Settings\jxl0575\My Documents\Visual Studio 2005\Project
    s tfsbuild.proj
    Microsoft (R) Build Engine Version 2.0.50727.42
    [Microsoft .NET Framework, Version 2.0.50727.42]
    Copyright (C) Microsoft Corporation 2005. All rights reserved.

    MSBUILD : error MSB1008: Only one project can be specified.
    Switch: Settings\jxl0575\My

    For switch syntax, type "MSBuild /help"

    C:\Documents and Settings\jxl0575\My Documents\Visual Studio 2005\Projects\Effor
    tTrackingSolution\TeamBuildTypes\Effort Tracking Service Build>

    I hope this helps.

    Jeff


  • Bogdan Crivat

    Are you doing the build from within "Visual Studio Command Prompt" What is the command line that you are executing

    Thanks.


  • Jompa

    Since the path has spaces, a double quotes is needed. Wrap C:\Doc...\Projects with double quotes i.e.

    msbuild /p:SolutionRoot="C:\Documents and Settings\jxl0575\My Documents\Visual Studio 2005\Projects" tfsbuild.proj

    Thanks.


  • BT_1960

    Jeff

    I tried this scenario and it seems to work for me. Could you post your TfsBuild.proj file

    Thanks


  • Team Build Desktop Build problems