Welcome to Team System Rocks Sign in | Join | Help
in
Home Blogs Forums Photos Tutorials Files Roller
Notion Solutions Main Site

Project build order instead of solution build order

Last post 08-18-2008, 9:17 AM by habeebuddin. 11 replies.
Sort Posts: Previous
  •  08-12-2008, 5:35 AM

    Project build order instead of solution build order

    Hi,

    Can we specify the build order of projects instead of Solutions in Team Build? Because I am having 2 solutions which contains some projects. These projects depend on other solutions projects and vice versa. There is no cyclic references. I want to specify the project build order instead of Solutions buildorder. Is it possible? If so how?

    Any help is appreciated.

    Regards

    Habeeb.

  •  08-13-2008, 8:07 AM

    Re: Project build order instead of solution build order

    Hi,

    I tried specifying the projects instead of solutions in SolutionToBuild property. It is working fine. But generating 3 warnings, though the Build status is "Successfully Completed". The warning is:

    Solution: , Project: MathLibrary.csproj, Compilation errors and warnings
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(0,0): warning : The OutputPath property is not set for this project.  Please check to make sure that you have specified a valid Configuration/Platform combination.  Configuration='Release'  Platform='Any CPU'

    And the build output(Release folder) is not generated inside the Drop Location.

    This project doesn't have any dependencies. It is a simple class library.

    can anyone help me how to specify the OutputPath property.

    Regards,

    Habeeb.

  •  08-13-2008, 9:11 AM

    Re: Project build order instead of solution build order

    Hello Habeeb,

    Check under <PropertyGroup> tag The <DropLocation> property.

    The DropLocation value can be in share folder (give the right permissions).

    Check that inside the TFSBuild.proj you can see the BuildConfiguration

    <ConfigurationToBuild Include="Release|Any CPU">
          <FlavorToBuild>Release</FlavorToBuild>
          <PlatformToBuild>Any CPU</PlatformToBuild>
        </ConfigurationToBuild>

     


    Developer & Senior Consultant
    http://blogs.microsoft.co.il/blogs/shair
  •  08-13-2008, 10:49 PM

    Re: Project build order instead of solution build order

    Hello Shair,

    I checked everything you mentioned above, and found that everything is correct.

    But still I am not gettnig Release folder in the drop location. Is there any other settings that I have to set?

    Regards,

    Habeeb.

  •  08-14-2008, 6:24 PM

    Re: Project build order instead of solution build order

    Hello Habeeb,

    Can you please post the tfsproj file and the it will be easier to locate the problem.

    Thanks


    Developer & Senior Consultant
    http://blogs.microsoft.co.il/blogs/shair
  •  08-16-2008, 11:29 PM

    Re: Project build order instead of solution build order

    Hello Shair,

    Please find the TFSBuild.proj file below.

    <?xml version="1.0" encoding="utf-8"?>

    <Project DefaultTargets="DesktopBuild" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

    <UsingTask TaskName="Microsoft.TeamFoundation.Build.Samples.GetRequestedBy" AssemblyFile="$(MSBuildProjectDirectory)\\Microsoft.TeamFoundation.Build.Samples.GetRequestedBy.dll" />

    <Target Name="BeforeOnBuildBreak">

    <GetRequestedBy

    TeamFoundationServerUrl="$(TeamFoundationServerUrl)"

    BuildUri="$(BuildURI)">

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

    </GetRequestedBy>

    <Message Text="$(RequestedBy)"/>

    </Target>

    <!-- 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>This is RnD Build</Description>

    <!-- BUILD MACHINE

    Name of the machine which will be used to build the solutions selected.

    -->

    <BuildMachine>172.16.124.74</BuildMachine>

    </ProjectExtensions>

    <PropertyGroup>

    <!-- TEAM PROJECT

    The team project which will be built using this build type.

    -->

    <TeamProject>WorkItem Repository</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>D:\HBBuildProject</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>\\172.16.124.74\BCShare</DropLocation>

    <!-- TESTING

    Set this flag to enable/disable running tests as a post build step.

    -->

    <RunTest>false</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.

    -->

    <WorkItemType>Bug</WorkItemType>

    <WorkItemFieldValues>Assigned To=$(RequestedBy);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>Never</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)\SuperSixAtMj.csproj" />

    </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|Any CPU">

    <FlavorToBuild>Release</FlavorToBuild>

    <PlatformToBuild>Any CPU</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=" ">

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

  •  08-17-2008, 1:51 AM

    Re: Project build order instead of solution build order

    Hello Habeeb,

    Notice that you building only the project and not the solution.

    <SolutionToBuild Include="$(SolutionRoot)\SuperSixAtMj.csproj" />

    If you like building the solution and need to specified the sln file location.

    Another thing:

    You don't need to create using for $(RequestedBy).

    You can delete the GetRequestedBy tag and the <Message Text="$(RequestedBy)"/> will still work.

    This will do the job -

    <Target Name="BeforeOnBuildBreak">

    <Message Text="$(RequestedBy)"/>

    </Target>

    Hope I helped.


    Developer & Senior Consultant
    http://blogs.microsoft.co.il/blogs/shair
  •  08-17-2008, 2:01 AM

    Re: Project build order instead of solution build order

    Hello shair,

    I have many solutions. The projects inside them depends on another solution's projects. So, I wanted to build them in a particular order. Is it necessary to put the solution file(.sln) in <SolutionToBuild/>? Though the build is succeeded, I am not getting the build output.

    Regards,

    Habeeb.

  •  08-17-2008, 2:32 AM

    Re: Project build order instead of solution build order

    Hello Habeeb,

    In order to build number of solutions during the build just add new key -

    <SolutionToBuild Include="$(BuildProjectFolderPath)/Solution1.sln" / >
          <
    SolutionToBuild Include="$(BuildProjectFolderPath)/Project2.proj">
             <Properties>
                   OutDir=$(BinariesRoot)\$(Solution)\$(Platform)\$(Configuration)\
            </Properties
    >

          </
    SolutionToBuild>

    If you project depends of different references add this key -
    <AdditionalReferencePath Include="C:\MyFolder\" />


    Developer & Senior Consultant
    http://blogs.microsoft.co.il/blogs/shair
  •  08-17-2008, 3:14 AM

    Re: Project build order instead of solution build order

    Hello Shair,

    Thanks for the reply. But I am going through a different kind of situation. I have 2 solutions.
    The Solution1 is having 1A, 2A, 3A projects.
    The Solution2 is having 1B, 2B, 3B projects.
    The startup project is Soltution1's 3A.

    1B - is referenced by 1A
    1A - is referenced by 2A
    2A - is referenced by 2B
    2B is referenced by 3B
    3B is referenced by 3A. [ 3A is the startup project]

    So the build order should be like:

    1B, 1A, 2A, 2B, 3B, 3A

    I want to build the above solutions. How can I do this?

    Regards,
    Habeeb.

     

  •  08-17-2008, 3:30 AM

    Re: Project build order instead of solution build order

    Hello Habeeb,

    Try this :

    <SolutionToBuild Include="$(BuildProjectFolderPath)/Solution2/1B.proj" / >
    <SolutionToBuild Include="$(BuildProjectFolderPath)/Solution1/1A.proj" / >
    <SolutionToBuild Include="$(BuildProjectFolderPath)/Solution1/2A.proj" / >
    <SolutionToBuild Include="$(BuildProjectFolderPath)/Solution2/2B.proj" / >
    <SolutionToBuild Include="$(BuildProjectFolderPath)/Solution2/3B.proj" / >
    <SolutionToBuild Include="$(BuildProjectFolderPath)/Solution1/3A.proj" / >

    To get the right reference add for each project
    <AdditionalReferencePath Include="$(DropLocation)\Solution1\3A" /> etc etc...

    Let me know if you have any problems.

     


    Developer & Senior Consultant
    http://blogs.microsoft.co.il/blogs/shair
  •  08-18-2008, 9:17 AM

    Re: Project build order instead of solution build order

    Hello Shair,
    After trying above solution, I am still getting the same problem....
    The error log is:

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(0,0): warning : The OutputPath property is not set for this project.  Please check to make sure that you have specified a valid Configuration/Platform combination.  Configuration='Release'  Platform='Any CPU'

    Regards,
    Habeeb.
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems