B.Young

Currently the only option ive seen is to cloak folders which is working great but forces me to continue to update workspacemapping.xml files. (See example A below) I was wondering if there was another way to do this that would be something like example B to specifically only get 1 branch instead of cloaking all of them. (Type=Exclusive is not real)

Example A:
< 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="$/Web Application" LocalItem="C:\TFSWorkspace\" Type="Map" />
<InternalMapping ServerItem="$/Web Application/BranchA" Type="Cloak" />
<InternalMapping ServerItem="$/Web Application/BranchB" Type="Cloak" />
<InternalMapping ServerItem="$/Web Application/BranchC" Type="Cloak" />
<InternalMapping ServerItem="$/Web Application/BranchD" Type="Cloak" />
<InternalMapping ServerItem="$/Web Application/BranchE" Type="Cloak" />
<InternalMapping ServerItem="$/Web Application/BranchF" Type="Cloak" />
<InternalMapping ServerItem="$/Web Application/BranchG" Type="Cloak" />
</Mappings>
</SerializedWorkspace>

Example B:
< 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="$/Web Application" LocalItem="C:\TFSWorkspace\" Type="Map" />
<InternalMapping ServerItem="$/Web Application/BranchH" Type="Exclusive" />
</Mappings>
</SerializedWorkspace>


Re: Team Foundation Server - General WorkspaceMapping.xml

Steve St.Jean

If I read you correctly, you want to ONLY get $/Web Application/BranchH. If so, you could use the following Mappings:

< 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="$/Web Application/BranchH" LocalItem="C:\TFSWorkspace\" Type="Map" />
</Mappings>
</SerializedWorkspace>

This will constraing you to just the BranchH branch in source control. Just update your solution path in TFSBuild.proj to remove BranchH and you should be good to go (asuming I'm reading you right).

- Steve






Re: Team Foundation Server - General WorkspaceMapping.xml

B.Young

Thank you, I'll give this a try.





Re: Team Foundation Server - General WorkspaceMapping.xml

B.Young

Works like a charm thank you very much!!





Re: Team Foundation Server - General WorkspaceMapping.xml

vitgr

But what if I have to add new UnitTest projects over and over to my project folder and I want to exclude them all Could I do some kind of wildcard exclusion to cloak all folders with "UnitTest" in the name:

< 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="$/MyTeamProject/MyProject" LocalItem="C:\TFSWorkspace\" Type="Map" />

<InternalMapping ServerItem="$/MyTeamProject/MyProject/MyBusiness/'%UnitTest%'" Type="Cloak" />
</Mappings>
</SerializedWorkspace>< xml version="1.0" encoding="utf-8" >

My TFS project structure looks like:

$/MyTeamProject
|
-MyProject
|
-MyBusiness
|
-UnitTest1
|
-UnitTest2
|
-UnitTest3
|
-MyWeb