Visual Source Unsafe

Visual SourceSafeWhen you are working on a project in Microsoft Visual Studio and you are bound to a Visual SourceSafe project you might be thinking to yourself "Let me check in my project just to make sure everything is backed up." Well that is a good idea. We all want to make sure our work is not being going to be lost, right?

Pop quiz hot shot

When you clicked 'Check in now (Recursive)', what did Visual SourceSafe just do?

  • A. Check in only that which is marked as currently checked out in your project.
  • B. Replace any project files in SourceSafe that are different from the ones on your machine.
  • C. Replace all project files on SourceSafe with the project files on your machine.
  • D. Ignore you altogether.

If you answered B, you were much like myself a few days ago. Some of you might be thinking... isn't B pretty much the same as A? No, it is not. Here is why. Lets say you sometimes work in Microsoft Expression Blend to do some design related work, and at the same time you use Visual Studio to do your coding. You can have the same project open and its up to you to make sure you save after any changes and reload the project in the other application to acknowledge the new changes. That is all well and good. Well here is the catch to that scenario:

Expression Blend does not check out your files when modified.
Visual Studio will not check out your files even if it detects that a change has been made.
Visual SourceSafe does not check in anything but that which is checked out.

Visual SourceSafe does not look for changes in the file at all. It only looks at if the file was checked out or not. Based on that, it checks in only those files that were checked out.



What have we learned today kids?

If you answered A, you got it correct. I would have been fine with B or C to be honest. If you answered D... you probably shouldn't be using SourceSafe. A workaround that will still allow you to productivity-holics to keep both apps open on the same project and not run into this trap is to check your entire solution out, prior to working on it.


Programming

kick it on DotNetKicks.com


Add a new comment



CAPTCHA image
Enter the code shown:
not case sensitive
refresh image