TFS &Visual Studio 集成 - 获取最新版本并不总是有效? [英] TFS & Visual Studio integration - Get Latest does not always work?

查看:23
本文介绍了TFS &Visual Studio 集成 - 获取最新版本并不总是有效?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Visual Studio 2005 中进行开发,使用 TFS 作为源代码管理.每当我有一段时间没有研究解决方案时,我总是在解决方案资源管理器中递归获取最新信息.

I'm developing in Visual Studio 2005, using TFS as the source control. Whenever I haven't been working on the solution for a while, I always do a recursive Get Latest in Solution Explorer.

然而,这似乎并不总是有效.如果我知道我没有最新版本的文件,即使右键单击它(在解决方案资源管理器中),选择获取特定版本并勾选强制获取"框也不起作用.

However, this doesn't always seem to work. If I know I don't have the latest version of a file, even right-clicking this (in Solution Explorer), choosing Get Specific Version and ticking the "Force get" box doesn't work.

我似乎需要打开 TFS 源代码管理窗口,然后强制获取相关文件.

I seem to need to open up the TFS Source Control window, and there force a Get of the file in question.

此外,解决方案资源管理器通常在文件旁边有一个小的签出给其他人"图标,但是当我签入源代码管理时,他们根本没有签出!

Also, the Solution Explorer often has the little "checked out to someone else" icon next to files, but when I check in Source Control, they're not checked out at all!

我只想知道这些问题是否普遍存在,它们是否在 VS2008 中仍然存在(我在 2008 年还没有将 TFS 用于一个大项目),以及是否有任何修复或解决方法.

I'd just like to know if these problems are widespread, whether they persist in VS2008 (I haven't used TFS for a big project in 2008 yet), and if there are any fixes or workarounds.

推荐答案

1) 我不会养成从解决方案资源管理器获取最新信息的习惯.即使它始终 100% 无错误地工作,它也比从命令行或源代码管理资源管理器执行它要慢得多,可靠性也差得多.SlnExp 必须抓取您的整个项目结构并发出非递归调用...伪算法:

1) I would not make a habit out of Get Latest from Solution Explorer. Even if it always worked 100% bug free, it is far slower and less reliable than doing it from the command line or Source Control Explorer. SlnExp has to crawl your whole project structure and issue non-recursive calls...pseudo algorithm:

parse sln file
foreach project in sln
    TFS_GET makefile
    parse makefile
    enumerate sourcefiles[]
    TFS_GET sourcefiles[]
loop

SCE 不需要解析并发出一个递归网络服务调用.除了性能提升之外,这样更安全:

SCE requires no parsing and issues one single recursive webservice call. In addition to the performance gain, this is much safer:

(a) 构建时依赖项并不总是项目文件列表的一部分.可执行工具、第 3 方程序集和部署脚本都是常见示例.SCE 会下载它们,SlnExp 不会.

(a) Build-time dependencies aren't always part of a project's file list. Executable tools, 3rd party assemblies, and deployment scripts are all common examples. SCE will download them, SlnExp won't.

(b) 当文件被重命名或移动时,对特定文件的作用域 Get 调用不会产生预期的结果.充其量,从磁盘中删除旧"名称;在最坏的情况下,似乎什么也没有发生.(这可能是您报告的错误的原因)为了真正与服务器同步重命名/移动文件,旧的 &新路径必须都在 Get 的范围内.

(b) Scoping Get calls down to specific files won't yield the expected result when a file is renamed or moved. At best, the "old" name is deleted from disk; at worst, nothing appears to happen at all. (this may be the cause of the bug you reported) In order for a file to truly be renamed/moved in sync with the server, the old & new paths must both be inside the scope of the Get.

2) 多年来,对 SlnExp字形"进行了许多错误修复.我不会说 VS2008 SP1 在这方面是完美的,但它肯定有所改进.

2) There have been many bug fixes to the SlnExp "glyphs" over the years. I won't claim that VS2008 SP1 is perfect in this regard but it is definitely improved.

这篇关于TFS &Visual Studio 集成 - 获取最新版本并不总是有效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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