有没有内置宏获得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的根目录?
发布评论