为什么我在编辑时不会自动从VSS检出文件?

时间:2021-04-30 14:22:01

This is driving me crazy and has resulted in lost work (not much, at least).

这让我发疯,导致工作丢失(至少不多)。

Normally, when I edit a file in Visual Studio, it's supposed to automatically check that file out in source safe. On multi-project solutions (e.g., web app with class libraries), sometimes none of the files in one project would automatically get checked out, though exiting & reloading visual studio may fix that problem temporarily. Furthermore, project files are never automatically checked out. Whenever I add/remove code files, I have to remember to explicitly check out the project file as well (otherwise we'll have issues with code files not showing up in the solution explorer, or trying to load non-existing files).

通常,当我在Visual Studio中编辑文件时,它应该自动检查源文件中的文件。在多项目解决方案(例如,带有类库的Web应用程序)上,有时一个项目中的任何文件都不会自动检出,但退出和重新加载visual studio可能会暂时解决该问题。此外,项目文件永远不会自动检出。每当我添加/删除代码文件时,我都要记得明确检查项目文件(否则我们会遇到代码文件没有出现在解决方案资源管理器中,或者尝试加载不存在的文件的问题)。

We're using VS-2008 and VSS 2005. Do you have any idea how I might fix this? There are no more visual-studio updates/fixes on Microsoft Update.

我们正在使用VS-2008和VSS 2005.你知道我怎么解决这个问题吗? Microsoft Update上没有更多的visual-studio更新/修复程序。

1 个解决方案

#1


You need to ensure the files are read-only, or VS won't be able to tell that they are version controlled (or, at least that's what it uses to determine it). You can tell VSS to set itself up so getting the latest version places the files RW on disk.

您需要确保文件是只读的,否则VS将无法确定它们是否受版本控制(或者至少是它用于确定它的用途)。您可以告诉VSS自行设置,以便获取最新版本将文件RW放在磁盘上。

There may be other problems here, but that's what comes to mind first. My advice (that I took myself) is to migrate to SVN or an alternative. Losing work is unacceptable.

这里可能还有其他问题,但这是首先想到的。我的建议(我自己)是迁移到SVN或替代。失去工作是不可接受的。

#1


You need to ensure the files are read-only, or VS won't be able to tell that they are version controlled (or, at least that's what it uses to determine it). You can tell VSS to set itself up so getting the latest version places the files RW on disk.

您需要确保文件是只读的,否则VS将无法确定它们是否受版本控制(或者至少是它用于确定它的用途)。您可以告诉VSS自行设置,以便获取最新版本将文件RW放在磁盘上。

There may be other problems here, but that's what comes to mind first. My advice (that I took myself) is to migrate to SVN or an alternative. Losing work is unacceptable.

这里可能还有其他问题,但这是首先想到的。我的建议(我自己)是迁移到SVN或替代。失去工作是不可接受的。