If you have access to the TFS server, you can use the directory::exists 
(http://nant.sourceforge.net/release/latest/help/functions/directory.exists(System.String).html)
 to see if a directory on the server exists.

<if test="${directory::exists('\\TFS_SERVER_NAME\SHARED_DIR_NAME')}">
                {DO WHAT YOU WANT}
</if>


Brian Wilson
Department of Human Resources
Email: brian.wil...@dhr.alabama.gov<mailto:brian.wil...@dhr.alabama.gov>


From: Macdiarmid, James D. [mailto:james.d.macdiar...@saic.com]
Sent: Tuesday, June 21, 2011 11:09 AM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] Connecting to TFS using Nant


Anyone have any suggestions for trapping when there is no network connection to 
TFS in a custom Nant task?
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to