I'm having a problem with the IVSSItem interface, using the VS2005 Beta2
interop assemblies (MS.VS.SourceSafe.Interop) in a C# project. I am able to
use the VSSDatabase class to connect to a local store and retrieve the
version history for a source file. This all works great and returns me the
correct number of versions.
However, if I call IVSSItem.Get(), it doesn't retrieve the file. I have
tried invoking this on the base VSSItem, as well as the IVSSItems for each
of the versions. The destination folders exist, and I have tried several
combinations for the flags values (but all the samples in the docs use 0 for
the flag). The method call does not throw any exceptions, and since the
return type is void, I've got no idea how, where, or why this is failing. If
I use the command line (ss.exe get [params]), it works just fine, so there's
no problem with the source safe store.
Any ideas?
Thanks.
--Matthew
Kevin Yu [MSFT] - 26 Aug 2005 10:47 GMT
Hi Matthew,
The Get method accepts two parameters, the first one is local path to which
you want to get the file. This path must include the file name that you
wish to get. The second parameter is optional, which holds any flag
settings you want applied to the Get event. The default for this parameter
is 0.
You can check the following documents for the usage of Get method.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvss/html/
vssauto.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvss/html/
msdn_vssole.asp
Also, you can download a complete code sample for VSS automation from the
following link. It is very useful.
http://www.msdn.microsoft.com/vstudio/previous/ssafe/downloads/samples/
Kevin Yu

Signature
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."