posted on Wednesday, September 29, 2004 8:37 PM
by
scotts
Strange VSS / VS.Net 2003 behavior
I came across a strange behavior with MS Source Safe and Visual Studio 2003 today; I’m sure it’s a feature and not a bug ;-)
I “got latest” on and opened a solution that contains a number of projects, all of which were “checked-in”. The solution is used by a few developers all working on different parts of it. When I opened things, I noticed that one of the projects had a bad reference. For the most part we are using a “partitioned solution” approach as described in Team Development With Visual Studio .Net and Visual Source Safe. I say for the most part, because we do have a few core components that cross between a few different solutions, which we file reference. Things that you might decide best to put in the GAC during release, but for development purposes we all use a common file reference for now. A pure “partitioned solution” would not have any file references.
When I noticed that one of the projects had a bad file reference (the reference was to another developers local path instead of the common /bin that is being used), I attempted to change the reference to the common location. Later in the day, I got latest on the solution again and noticed that the file reference was back to the old improper location.
If you explicitly “remove” the file reference, you will be prompted to check out the project. You can then add the new correct reference, and when you check all your code back in everything is good. However, if you do not explicitly remove the old reference, and go right to the “add reference” step, and choose to add a file reference to an assembly that is already added (but from a different location), you will not be automatically prompted to check-out the project. The new reference will take place and all will be good for you locally, but Source Safe will not respect the change. The next time a “get latest” is done on the solution…poof, your corrected reference will be gone. You may ask “why would you add the correct reference without removing the incorrect reference first?” Well that’s an easy answer; it’s one less click, and it lets ya do it…or so it appears.
Thanks to Andy Zenker for lending a second set of eyes as we stumbled through what was going on.