KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q156513: INFO: Which Visual C++ Files to Add to Source-Code Control

Article: Q156513
Product(s): Microsoft SourceSafe
Version(s): WINDOWS:4.0,4.0a,5.0,6.0
Operating System(s): 
Keyword(s): kbinterop kbSSafe400 kbSSafe500 kbSSafe600 kbVC400 kbVC500 kbVC600
Last Modified: 04-MAY-2001

-------------------------------------------------------------------------------
The information in this article applies to:

- Microsoft Visual SourceSafe for Windows, versions 5.0, 6.0 
- Microsoft Visual SourceSafe, 16-bit, for Windows, version 4.0 
- Microsoft Visual SourceSafe, 32-bit, for Windows 4.0 
- Microsoft Visual SourceSafe, 16-bit, for Windows, version 4.0a 
- Microsoft Visual SourceSafe, 32-bit, for Windows 4.0a 
-------------------------------------------------------------------------------

SUMMARY
=======

The general rule of thumb for adding files from a Visual C++ project to
source-code control is: If the file is text, it is probably OK to add; if the
file is binary, it probably should not be added.

MORE INFORMATION
================

When checking in files, Visual C++ will automatically prompt you to check in all
files in the Project Workspace Pane plus the project makefile (.mak). In most
cases, these will simply be the source files needed to open and rebuild your
Visual C++ project.

You can add binary files to your Visual C++ project. They will appear in the
Project Workspace Pane and Visual C++ will attempt to add them to source-code
control. In some cases, this is desirable (for instance, bitmaps) and in other
cases, this is not desirable (for instance, import libraries).

Following is a (non-exhaustive) list of file extensions for files that should be
added to source-code control under normal circumstances:

  .mak, .dsp, .c, .rc, .rc2, .ico, .bmp, .txt, .def, .hpj, .bat, .rtf,
  .odl, .inf, .reg, .cnt, .cpp, .cxx, .h, .hpp, .hxx, .inl, .tpl, .vtp,
  and .mst.

Usually, these files cannot be easily regenerated. There are issues that need to
be considered when sharing a makefile through source-code control. These issues
are discussed in the Visual C++ Online documentation. Please see the REFERENCES
section below.

Following is a (non-exhaustive) list of file extensions for files that should not
be added to source-code control under normal circumstances :

   .pch, .mdp, .ncb, .clw, .obj, .exe, .aps, .cpl, .awk, .exp, .lib, .idb,
  .opt, .pdb, .map, .res, .ilk, .scc, .bsc, .sbr, .dll, and .tlb.

Usually, these files are automatically regenerated by Visual C++ in opening,
editing, and building the project.

REFERENCES
==========

For additional information, please see the following article in the Microsoft
Knowledge Base:

  Q132340 Common File Extensions Used by Visual C++


"Maintaining Makefiles Under Source-Code Control" and "Putting Files Under
Source-Code Control" from the Visual C++ Online documentation.

Additional query words:

======================================================================
Keywords          : kbinterop kbSSafe400 kbSSafe500 kbSSafe600 kbVC400 kbVC500 kbVC600 
Technology        : kbSSafeSearch kbAudDeveloper kbSSafe600 kbSSafe400 kbSSafe400a kbSSafe500 kbSSafe16bitSearch kbSSafe32bitSearch
Version           : WINDOWS:4.0,4.0a,5.0,6.0
Issue type        : kbinfo

=============================================================================

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.