有没有宏观获得Visual Studio中的TFS Sourcecontrol的根目录? [英] Is there any macro to get the root directory of the TFS Sourcecontrol in Visual Studio?

查看:158
本文介绍了有没有宏观获得Visual Studio中的TFS Sourcecontrol的根目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有内置宏获得Visual Studio中的TFS Sourcecontrol根目录?

Is there any built-in macro to obtain the TFS Sourcecontrol Root directory in Visual Studio?

例如就像$(PROJECTDIR),我会用$(TFSSourceControlRoot)或类似的东西?

For example just like $(ProjectDir), I would use $(TFSSourceControlRoot) or something like that?

我需要这样做的原因是为了使用这条道路中,我将需要作为一个后生成操作的一部分xcopy命令。而不是写类似的C:\来源\ Scripts中,我想写点东西像$(TFSSourceControlRootDir)\来源\脚本

The reason I need this is to in order to use this path in the xcopy command which I will need as a part of a post build action. Instead of writing something like C:\Source\Scripts, I want to write something like $(TFSSourceControlRootDir)\Source\Scripts.

推荐答案

如果你指的是服务器上的文件夹结构的根目录的,那么你可以称其为简单的 $ / 。但是,如果你的意思是,这是映射到本地文件夹中,有没有为宏。其原因是,你可以映射任意数量的服务器层级到本地磁盘文件夹的文件夹,所以不一定是单根 - 而且也并不一定映射到 $ / 的。

If you mean the root of the folder structure on the server, then you can refer to it as simply $/. However, if you mean the local folder that this is mapped to, there's not a macro for that. The reason is that you can map any number of folders in the server hierarchy to local disk folders, so there's not necessarily a single root - and there's not necessarily a folder that maps to $/ at all.

(也就是说,如果你能解释一下为什么你需要它,有可能是另一种建议...)

(That said, if you can explain why you need it, there might be alternative suggestions...)

这篇关于有没有宏观获得Visual Studio中的TFS Sourcecontrol的根目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆