gpt4 book ai didi

version-control - 命令行中的 "tf get"没有获得最新版本,UI 中有

转载 作者:行者123 更新时间:2023-12-02 04:55:26 25 4
gpt4 key购买 nike

我的语法正确吗?

  tf get .\Web\project.root /recursive
All files are up to date.


tf get /version:T .\Web\project.root /recursive
All files are up to date.

使用命令行获取最新版本会报告所有文件都是最新的,而实际上并非如此!但是,当我在 Visual Studio 中使用 TFS UI 获取最新信息时,实际上会下载最新的代码。

在这个问题得到解决之前,如果不打开 Visual Studio 首先获取最新版本,我的 super 花哨的 msbuild 脚本就无法使用!!

  <Target Name="GetLatestCoreLibraries" Condition="'$(GetLatest)' == 'true'">
<Exec Command='tf get /version:T "$(CoreLibPath)\Source\Libraries /recursive' ContinueOnError="false" />
</Target>

$(CoreLibPath) 是传递到脚本中的相对路径。类似...

  <PropertyGroup>
<CoreLibraryPath>..\..\Core\Release\xx.xx.xx.xx</CoreLibraryPath>
</PropertyGroup

使用本地文件系统的相对路径是否不如使用 SCS 路径可靠?即... $/Core/Release/xx.xx.xx.xx/Source/Libraries"?

是否我们有时使用 Dev Studio UI,有时使用命令行,这会混淆 TFS 的命令行版本?

最佳答案

所以,我认识到了自己的错误。非常简单。

Command = 

'tf get
/version:T
/recursive
"$(CoreLibPath)\Source\Libraries <<<-- Missing closing quote.
'

当您错过 tf get 上的结束双引号时,不会引发错误。它只是报告“所有文件都是最新的。”

c:\Web\Release\x.x\x.x.xxxx>tf get /version:T "..\..\..\..\..\Core\Release\x.x\x.x.xxxx.xxxxx(xxxx xx xx - xxx)\Source\Libraries /recursive
All files are up to date.

Q: Is using relative paths to the local file system less reliable than using SCS paths? ie... $/Core/Release/xx.xx.xx.xx/Source/Libraries"?

答:不,它似乎并没有变得不可靠。

Q: Could it be that we're sometimes using Dev Studio UI, and other times using the command line that is confusing the command line version of TFS?

答:不,这是用户混淆的情况,而不是 SCS 混淆的情况。

关于version-control - 命令行中的 "tf get"没有获得最新版本,UI 中有,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9590200/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com