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
