How to make "Team Build" skip getting certain folders?
Thanks
-Matt-
Thanks
-Matt-
You just need to change the workspace mappings used by the build: http://blogs.msdn.com/buckh/archive/2007/02/28/schema-for-the-workspacemapping-xml-file.aspx.
Buck
That somewhat answers one of my questions. But I ran into a snag getting multiple folders for different projects.
Within the WorkSpaceMappings.xml, if i have it listed as such.
<?xml version="1.0" encoding="utf-8"?>
<SerializedWorkspace xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Mappings>
<InternalMapping ServerItem="$/Development_Code/Client/Project1" LocalItem="F:\Build_Management\TFSWeb1\Development_Code\Client\Project1" Type="Map" />
</Mappings>
</SerializedWorkspace>
It drops the Source files into the root of the Folder.
but if I add a second Folder to include
<?
xml version="1.0" encoding="utf-8"?><
SerializedWorkspace xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><
Mappings><
InternalMapping ServerItem="$/Development_Code/Client/Project1" LocalItem="F:\Build_Management\TFSWeb1\Development_Code\Client\Project1" Type="Map" /><
InternalMapping ServerItem="$/Development_Code/Deployment/BuildProject1" LocalItem="F:\Build_Management\TFSWeb1\Development_Code\Deployment\BuildProject1" Type="Map" /></
Mappings></
SerializedWorkspace>
It Suddenly changes to the Root + /Client/Project1 and Root + /Deployment/BuildProject1 when they should both just be in the root. Is there a way to override this behavor?
You may need to override the AfterGet target to achieve this. Something like this should work:
<Target Name="AfterGet">
<CreateItem Include="$(SolutionRoot)\Project1\**\*.*">
<Output ItemName="Project1Files" TaskParameter="Include" />
</CreateItem>
<CreateItem Include="$(SolutionRoot)\BuildProject1\**\*.*">
<Output ItemName="BuildProject1Files" TaskParameter="Include" />
</CreateItem>
<Move SourceFiles="@(Project1Files)" DestinationFiles="@(Project1Files->'$(SolutionRoot)\%(RecursiveDir)%(FileName)%(Extension)')" />
<Move SourceFiles="@(BuildProject1Files)" DestinationFiles="@(BuildProject1Files->'$(SolutionRoot)\%(RecursiveDir)%(FileName)%(Extension)')" />
<RemoveDir Directories="$(SolutionRoot)\Project1;$(SolutionRoot)\BuildProject1" />
</Target>
There is not a way to override this behavior in V1 - you'll need to do something like William's suggestion if you need this sort of directory structure. Watch out for relative paths, however - if your development box workspace mappings do not put these files into the same directory, any references between the two may end up broken.
Also note that in Orcas you will be able to specify a full-fledged workspace, rather than dealing with the pseudo-workspace from v1 (where LocalItems are ignored, etc.).
-Aaron