Search code examples
c#visual-sourcesafe

Check out automatically on edit in Visual Studio 2010


When I edit the code I would like the cs file is became checked out automatically. In the Tools -> Option -> Source Control -> Enviroment in the On Edit there is Check out automatically but it does not work. Some help?


Solution

  • 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.

    There may be other problems here, but that's what comes to mind first.

    Source: https://social.msdn.microsoft.com/Forums/vstudio/en-US/88d652fa-1fef-4e3c-8dcb-a2079a96f031/visual-studio-2010-automatic-check-out-not-working-on-file-edit-or-save?forum=tfsversioncontrol

    Update: Read only possible reasons: Possible problems:

    • Files on network drives. If the network is slow, the compiler can have trouble accessing the file.
    • File still open in (an other) editor. Normally this shouldn't be a problem, but you may never know.
    • Some code files are generated during the build. In this case they don't belong in the version system, their source (if any) does.

    Hope this will helps you.

    Thanks