
Signature
Jim
"Remember, an amateur built the Ark; professionals built the Titanic."
> I have several VS solutions/projects that I work on. I back them up in
> PKZip files from the directory above the solution/project root
> directory. When I (occasionally) screw up a project and recover it
> from the zip file, the VS state is not recovered. By "VS State" I mean
> the list of opened files and the state of the solution explorer. Where
> is this stuff normally saved across a close/reopen?
I have been closing the project, but not VS. Just now I tried closing
VS before zipping. After zipping, I renamed my project root and
restored the root from the zip file to the original name. I then
restarted VS and recalled the last recent project. No files were
auto-displayed. I closed the project, deleted the restored root,
renamed the original root back to the original name, and recalled the
last recent project. All previously displayed files were displayed. It
really doesn't make sense. If it were storing this stuff in the
registry, the last step would not have displayed any files. VS seems
to keep this stuff somewhere on disk, but where?
> Do you close VS before you zip? If not the files containing the project may
> be skipped because they are "open." The technique you describe works for me.
[quoted text clipped - 4 lines]
> > the list of opened files and the state of the solution explorer. Where
> > is this stuff normally saved across a close/reopen?
Jim Nugent - 28 Oct 2004 02:24 GMT
> I have been closing the project, but not VS. Just now I tried closing
> VS before zipping. After zipping, I renamed my project root and
[quoted text clipped - 6 lines]
> registry, the last step would not have displayed any files. VS seems
> to keep this stuff somewhere on disk, but where?
OK, let's think about this. If it were storing the info elsewhere, it would
be intact, unaffected by your renaming and unzipping, right? And since you
unzipped an exact replica of the solution as VS had last seen it to a folder
with the same name, nothing could have changed that might have pointed to
that information, right? I'm stumped.
FWIW I tried zipping, deleting, and unzipping the folder, and all files
opened up as before. Then to exactly replicate your case, I renamed the
folder and unzipped again, creating the original folder. Same outcome. Mine
is a web project.
Third experiment: Open the solution Foo and open several files. Close VS,
and copy Foo.suo off to the side. Open VS and close all files, then close
VS. Replace Foo.suo with saved copy. Open VS, and all files open as before.
Conclusion: This info is in the .suo file. If you look up the file "type"
you get VS Solution User Options (suo). It's a "hidden" file. Are you sure
you are preserving it?
I knew I'd read something that explained the roles of the various files.
Here's one (watch out for wrap)...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/ht
ml/vetchwebprojectssourcecontrolintegrationinvisualstudionet.asp

Signature
Jim
"Remember, an amateur built the Ark; professionals built the Titanic."
charles hamm - 28 Oct 2004 13:59 GMT
Jim,
Thanks for the info. Unfortunately, my version of PKZipC, even though
I am using the -attributes=all option on the command line, does not
include the .suo file.
(I'm doing the zip from a script). If I do the zip from PKZipW, the
.suo file is included.
> I have been closing the project, but not VS. Just now I tried closing
> VS before zipping. After zipping, I renamed my project root and
[quoted text clipped - 15 lines]
> > > the list of opened files and the state of the solution explorer. Where
> > > is this stuff normally saved across a close/reopen?