Ahhh. that sounds exactly like what I want. Saves me having to point to a different path and needing a manual copy step to put it back.
Thanks Buck. ________________________________ From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Buck Hodges [EMAIL PROTECTED] Sent: Thursday, 24 April 2008 2:02 PM To: [email protected] Subject: RE: [OzTFS] Linked File outside workspace You can do this, if I understand what you are doing, with one-level mappings in 2008. To get just the the immediate children of $/A, add a mapping for $/A/* (the asterisk indicates that it is a one-level, non-recursive mapping). You can go with something like the following. $/A/* -> <local path> $/A/B/X -> <local path>\B\X Buck From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Nagy Sent: Wednesday, April 23, 2008 11:57 PM To: [email protected] Subject: RE: [OzTFS] Linked File outside workspace Well the problem is that I already have workspaces deeper in the heirarchy. And TFS won't let you map multiple workspaces to the same parts of paths. Eg. I have: $\A\B\X\files $\A\B\Y\files I also have: $\A\files The problem is that I only want the first path X but not the second path Y to get sucked down during the CoreGet target. So I map a workspace to $\A\B\X\ I then also need the files at A\ but TFS won't let me add a workspace to that location because the previous workspace shares that path (on the physical disk). Anyway, I have managed to solve this problem by adding another workspace that points to $\A\ and it uses a different physical directory, something like C:\TempWorkspace\ I then manually copy from that temp location across to where the other source files are created. The other solution I came up with was to only have 1 workspace that points to $\A\ and override the CoreGet target to only get X and to only get files (non-recursive) from A Obviously the other solutions are also to use a custom task or to user Grant's command line tool. I'm still interested to hear any other ways though...? ________________________________ From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Buck Hodges [EMAIL PROTECTED] Sent: Thursday, 24 April 2008 1:36 PM To: [email protected] Subject: RE: [OzTFS] Linked File outside workspace Why not just map that file to the appropriate place? If you are using TFS 2008, you can do that in the GUI on the workspace tab of the build definition dialog. Buck From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Nagy Sent: Sunday, April 20, 2008 11:10 PM To: [email protected] Subject: RE: [OzTFS] Linked File outside workspace Thanks Wil. This is a start, but I'd like to dodge the custom task at this stage if possible. That's a good post of Grant's though. Is it possible to get a file, even if there was a way to specify a workspace and tell it NOT to get all the workspace, just one file in it? ________________________________ From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of William Bartholomew [EMAIL PROTECTED] Sent: Monday, 21 April 2008 12:52 PM To: [email protected] Subject: RE: [OzTFS] Linked File outside workspace Steven, Grant has a utility called TFSDownloadFile.exe which does not require a workspace to get a file, you could use the MSBuild Exec task to call this and download the file you need, in fact in Grant’s post he shows the API his utility calls so you could create your own MSBuild task rather than shelling the utility: http://ozgrant.com/2006/08/17/get-a-file-from-tfs-without-a-workspace/ AfterGet is definitely the correct place to do this. I believe the $(SourceDir) variable is available, if not $(SolutionRoot) should definitely work. William From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Nagy Sent: Monday, 21 April 2008 12:45 PM To: [email protected] Subject: [OzTFS] Linked File outside workspace Hey all We have a CI build that references a workspace, lets call it $\A\W\ In there is a solution, lets call it $\A\W\test.sln I am building this solution. However, test.sln has a project which references a file as a shortcut. Lets call this file: $\A\version.cs Because the workspace does not include the shortcut file, the source is not retrieved and the file is not 'gotten'. Build fails. So I am thinking that I need to have a manual 'get' step for the shortcutted file. I figure that 'AfterGet' is the best target to put my manual calls in. I investigate the GET task which only seems to accept a workspace rather than a single file. I then investigate the TF GET command line call, which seems to only accept the same stuff (I wouldn't be surprised if the former is just a wrapper to the latter). So I am a bit stuck. I need to get one file. What's the best task to use? Secondly, I'm not really sure where to put that file. My build definition is pretty simple... its just a workspace and a list of 'SolutionToBuild's. Still quite new to team build, but I am guessing team build will automatically 'get latest' of my workspace. Oh I forgot to mention, my workspace maps to $(SourceDir)\A\W Which means that (to answer my second question) I should try and put my version.cs file in $(SourceDir)\A\version.cs ? (I presume that variable is available). KTHXBYE OzTFS.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. View the web archives at http://www.mail-archive.com/[email protected]/ Powered by mailenable.com, supported by www.readify.net OzTFS.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. View the web archives at http://www.mail-archive.com/[email protected]/ Powered by mailenable.com, supported by www.readify.net OzTFS.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. View the web archives at http://www.mail-archive.com/[email protected]/ Powered by mailenable.com, supported by www.readify.net OzTFS.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. View the web archives at http://www.mail-archive.com/[email protected]/ Powered by mailenable.com, supported by www.readify.net OzTFS.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. View the web archives at http://www.mail-archive.com/[email protected]/ Powered by mailenable.com, supported by www.readify.net OzTFS.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. View the web archives at http://www.mail-archive.com/[email protected]/ Powered by mailenable.com, supported by www.readify.net OzTFS.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. View the web archives at http://www.mail-archive.com/[email protected]/ Powered by mailenable.com, supported by www.readify.net
