What is a VSS Shadow Folder?

I played racquetball yesterday against a Web developer
who sometimes works as a vendor at Microsoft (a V-Dash in Microspeak). After he
beat me soundly in three straight games, he asked me what a "programmer/writer"
does on a daily basis. He had seen my job title in my Outlook personnel
properties. I explained that a programmer/writer writes
documentation. Specifically, I write the documentation for Visual
SourceSafe and source control integration features in Visual Studio .NET. 
I took a deep breath and prepared myself for the normal barrage of
questions. Alas, my racquetball partner asked some questions that I can
answer.  In fact, I have answered many of his
questions in this weblog. He asked questions like,

Q: How can I move a database from one computer to another?
A: Literally
drag and drop the entire database directory.

Q: How can I work on my laptop and synchronize with the VSS database when I
go back online.
A: In VS.NET, checkout the project and then click File|Source
Control|Change Source Control, select your solution and click Disconnect.
Go offline. Upon reconnecting, repeat steps above, click Connect in the Change
Source Control dialog box, and then check in your project.

And then he said something funny (at least I think it's funny:).  When
discussing how to take his projects offline he mentioned that somebody
on his team had suggested Shadow Folders.  Whoa!

Stop right there.

Q: What is a Shadow Folder?
A: A Shadow folder is a read-only copy of the
tip version* of all files in a given VSS project folder. It is regularly
updated, or at least it should be.

Q: When should I use Shadow Folders?
A: I use shadow folders to give
non-team members a glimpse into the latest state of my source files and
projects.  Shadow folders are great for managers and the members of related
teams because they aren't tempted to checkout (and screw up) your source

Q: Is there anything I can do to make Shadow Folders more usable?
A: Yes!
When naming your VSS project folders and when creating any file
that might be added to the VSS database, create filenames that contain no
whitespaces. I use underscores instead (eg, My_Project_1.csproj in
$/Projects_2/SourceFiles). Doing so allows me to embed live UNC links to the
shadow copies of my source controlled files in emails and other documents
(eg, //mycomputer/Projects_2/SourceFiles/My_Project_1.csproj).

Q: How can I setup Shadow Folders for my database?
A: You can do so on a
project by project basis using VSS Administrator. Click Tools|Options, select
the Shadow Folders tab, click the Browse button and select a desired VSS project
folder. Then, click the 2nd Browse button and specify the path on physical disk
where you'd like to save the shadow copies of the files in this VSS project
folder. To shadow the entire database, select $/.

*The "Tip Version" is the version of a file in a VSS
database that sits atop its version stack. It is the most recently created
version. The Tip Version is not necessarily the Latest Database Version
however. If you pin a file at a particular version (say v5 of 10 vers), that
version (v5) becomes the Latest Database Version.

Este mensaje se proporciona "como
está" sin garantías de ninguna clase, y no otorga ningún

Comments (15)

  1. Something that’s baffled me about sourcesafe/,net intergration is offline checkouts. We’ve got a large pool of source, and frequently people will head off at short noticed and work while their away. They wont know exactly what in the source they will be working on so cant check it all out before they go. Using offline checkouts is peachy, while you’re away.

    Then you get back to the office and set yourself back online. It now checks everything out to you that you’ve changed so you can check it in. However if another developers been working on that file, you loose your changes when it tries to check the file out! I’ve never understood why it doesn’t check out a Historical version to you, the version that was the one before the other developer altered the file. (This is the only way I’m able to for it to merge my changes on check in, rather than loose them)

    In general though, the documentation is excellent, but the above I think should be in an FAQ.

    PS. On a different topic, does the .NET IDE team have anyone like Raymond Chen, that perhaps reports on the historical reasons for doing stuff in the .NET IDE in their blogs?

  2. Short Answer: No.

    Long Answer: Raymond Chen (http://blogs.gotdotnet.com/raymondc/) is an exceptional cat. The potential Raymond Chens of Visual Studio .NET have either:
    a) moved on to other teams (Shane, Bill, Jonathan, Natalie [okay, I’m starting to tear up]… VS.NET has been a victim of its own success) or
    b) do not maintain blogs.

    I’ve been on the VS.NET team for four years and, even though I write about source control, I have been closely attached to the core IDE. For example, I wrote the project documentation for VS2002. The VSCore team, as we call it, has two other up and coming bloggers: Chris Flaat (http://blogs.gotdotnet.com/cflaat/) and Josh Ledgard(http://blogs.gotdotnet.com/jledgard/). I encourage you to check out their blogs and push their buttons for topics. If you tune into our blogs occasionally, you just might discover a link to the Raymond Chen of VS.NET… whoever that might prove to be.

    In the meantime, if there’s something in particular about the history and development of the Visual Studio .NET integrated development environment that you’d like to know, post your suggestions here. I’ll do my best to solicit or throw together a well-researched response.

  3. AsbjornM says:

    Shadow folders, interresting feature, I’ve used it alot some time ago.,.
    Today I tested it and it didn’t work.. Do you really need to check files in via vss explorer?, it didn’t work when checking in files via vs.net..
    Or maybe there is an issue with making an shadow folder of an share of the folder the project is in?

  4. For some really, really odd reason, I’ve never used shadow folders to shadow my VS.NET development projects. Embarrassing. Must do. Today. Is anyone out there using shadow folders in this capacity successfully?

  5. Okay, I just set up a shadow folder for the database where I store my C# and VB projects. I then checked out a few files, added some dummy source files, made some changes to existing files and checked in my changes. I also added an entirely new solution to my database. I then successfully synchronized my shadow folder with my database by performing a Diff of $/ and the root of my shadow directory (C:/sources_shadow) and and selecting the Reconcile All option in the Project Differences dialog. The last step "Got" the VSS project folder for my new Solution to the shadow folder. I’m not saying there isn’t a problem, but this seems to be working well for me. Additionally, I have heard no complaints about this feature from VS.NET customers directly or in the newsgroups or listservs. Perhaps you can expand on what you mean by "maybe there is an wissue with making an shadow folder of a share of the folder the project is in?"

    Now, I just need to lay my hands on or write an automatic shadowing script using VSS’ OLE automation to ensure that all new created projects are instantly added to the shadow folder. Surely somebody has one laying around…

    Asbjorn, If you’re expecting new projects to be added automatically, it isn’t going to happen. Files changes are updated in the shadow folders but new, renamed, or deleted projects are not. I just re-read the Visual SourceSafe documentation for shadow folders which, with one minor exception (no how to update shadow folders topic:(, is really quite excellent and descriptive. The leaves never stop falling.

  6. AsbjornM says:

    Bad explaination from me 🙂
    Okey, the reason for what I’m doing: We have an web project, historically, in our web projects various testfiles creep in, and they have an nasty way of getting all the way to the complete product.
    To solve this easily I set up an share within vss, and then dragged only the files that should be with the project (.aspx and such), We will need to manually update this share, but that’s okay.
    On this folder we created an share, where we use an UNC path to another server where to write the files (for testing of the web solution)
    But when the developer modify the files in the original folder via vs.net, these changes doesn’t get out on the shadow folder..
    Maybee this is an unsupported way of using shares/shadows combo, but I think it is an cool way of solving our problem.. 🙂

  7. ramin says:

    Is it true that V- guys are often smarter than MS perm employees?

  8. OK the example above works to gen the shadow for a small project. For a large project > 5000 files and 20 subprojects that also contain subprojects it is a SLOW & PAINFUL process. For hicups and accidently deleted shadow files we need a way to regenerate the shadow batch mode without human intervention.

    I would think there would be an admin to gen/regen the shadow. This is what i need. Any ideas?



  9. Michael Sizemore says:

    I see that projects must be manually shadowed, and that new project will not be automatically added to the shadow; but new files within the project will be automatically added to the shadow, correct?

  10. Tom says:


    My boss wants to take a shadown directory and have those files reflected for download on an intranet page. The way you describe shadow though sounds like the files cannot be touched.

    Is there anyway to have a link on an intranet page that points to a VSS version of a file for download? They wouldn’t necessarily have to pull the file from VSS – it could be duped in a local file directory on the server. But we would want it to update each time the VSS copy updates.

    Maybe this is pie in the sky dreaming…


  11. ferrethouse says:

    .NET 2.0 automatically compiles itself when needed. can’t i set my shadow folder to be my web site. that way my dev web server always contains the latest code and I don’t have to checkout all the files there whenever I want to refresh the development web site. Would that work?

  12. Vladox says:

    Does anybody knows how to debug a shadow folder that doesn’t work I mean is there a mode that while log the VSS Admin activity to find out what the heck is happening that prevents VSS to copy the damn files to the assigned Shadow folder ???

    I’m getting crazy trying to make this work after switching the database to another server.


  13. damien says:

    Same problem here we copied a databse from one dev server that was getting ready to die to a new one and shadow folders stopped working, but only from vs.net 2005 integrated environment.  Still works from vss2005 client.

    Does the local vsscc file need to be rebuilt?

Skip to main content