tags:

views:

35

answers:

2

Hi all.

I have a solution the source Control (TFS 2008) with multiple projects. Some of the projects are independent of each other. I dont want to build the complete solution instead sometimes we need to build some of the projects.

I am a total newbie in Team Build. Please help how i can use the

 <SolutionToBuild Include="$(BuildProjectFolderPath)/../../Development/Main/Build-Development.sln">
        <Targets></Targets>
        <Properties></Properties>
    </SolutionToBuild>

to select only some of the projects from the solution.

Kindly give a detailed answer for me as i am absolutely clueless about it.

Thanks

+1  A: 

Create a second build and a second .sln file to do the build. We have one project with three different builds in it (a "main" build, a "utility" build, and a "code analysis" build).

Manually create a solution that includes all the projects you want to build and check it in. Then create a new build using the wizard. Finally, edit the created .PROJ file (found in $/ProjectName/TeamBuildTypes) and point it to the correct solution.

Alternatively, you could copy and modify your existing .PROJ file, but since you said you're a newbie, I'd stick with the first to begin with.

Robaticus
Thanks for the response. I also want to try out the Targets attribute to selectively build projects in existing solution. Kindly help in that as well. Thanks
Steve Johnson
I tried your solution and i am getting this error:Exception Message: TF214007: No build was found with the URI vstfs:///Build/Build/14365. Either the URI does not exist, or TLR\svcTFSService does not have permission to access it. (type BuildNotFoundForUriException)
Steve Johnson
That looks like a caching issue. Delete the cache on the build server for your build service account. the cache file is found at: `C:\Documents and Settings\<<build service account>>\Local Settings\Application Data\Microsoft\Team Foundation\2.0\Cache`
Robaticus
+2  A: 

The easiest way to do this is to define a new solution configuration for your existing solution. Just follow these steps:

  1. Open your solution
  2. From the main Visual Studio menu, select Build > Configuration Manager...
  3. Click the "Active solution configuration" drop down and select New...
  4. Enter a name for the new configuration (e.g. "TFS")
  5. Specify the configuration to copy settings from (e.g. "Release")
  6. In the "Build" column, uncheck any projects you don't want to build from your TFS Build
  7. Click Close
  8. Update your configurations to build to use the configuration you just defined

That's it! There's no need to manage multiple solutions and new projects should be included in your new configuration by default. Switching them off is as simple as clearing a checkbox.

Jim Lamb
Thanks a lot. it really worked. Thanks again.
Steve Johnson