Binary files become corrupted when you check in earlier versions in Visual SourceSafe (814677)



The information in this article applies to:

  • Microsoft Visual SourceSafe, 32-bit, for Windows 6.0c, when used with:
    • Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
    • Microsoft Visual Studio .NET (2002), Enterprise Developer Edition

SYMPTOMS

If you check out an earlier version of a binary file from Microsoft Visual SourceSafe, you edit the file, and then you check in the file, Visual SourceSafe Explorer may appear to stop responding (hang) when the program tries to display the Merge dialog box. If you choose to merge your changes, the latest version of the file becomes corrupted.

CAUSE

This behavior occurs because the Visual SourceSafe merge functionality is designed for use with text source files. The merge functionality is not designed to merge binary files.

RESOLUTION

If you must edit an earlier version of a binary file, branch that file into a new project at the version that you want, and then edit the branched copy of the file.

STATUS

This behavior is by design.

MORE INFORMATION

Microsoft Visual SourceSafe is a version control program for source code files. Visual SourceSafe supports advanced functionality such as the ability to check out earlier versions of files and to merge changes into later versions. This functionality is designed for use with text-based files.

Although you can perform these operations on binary files such as image files or executable files, Microsoft does not recommend that you do so because these operations may damage the binary files that you have stored in the Visual SourceSafe database.

Steps to reproduce the behavior

To reproduce the behavior, follow these steps:
  1. Add a bitmap (.bmp) file or another binary file to Visual SourceSafe.
  2. Check out the file, edit the file, save the file, and then check in the file.
  3. In Visual SourceSafe Explorer, right-click the file, click Show History, and then click OK.
  4. Click an earlier version of the file that you edited in step 2, and then click Check out.
  5. Edit the file, and then save the file.
  6. In Visual SourceSafe Explorer, check in the file.

    Notice that Visual SourceSafe Explorer appears to stop responding.
  7. In the Merge dialog box, merge your changes.
Notice that, when the merge has completed, the latest version of the file has become corrupted, and you cannot retrieve it.

Modification Type:MinorLast Reviewed:4/28/2004
Keywords:kbprb kbSSExplorer kbSrcControl KB814677 kbAudDeveloper