Retrieve Vault login information from Visual Studio

Post your questions regarding using the Vault and Fortress API in your programs.

Moderator: SourceGear

Post Reply
pjmartins
Posts: 5
Joined: Fri Oct 08, 2010 7:13 am

Retrieve Vault login information from Visual Studio

Post by pjmartins » Fri Oct 08, 2010 7:20 am

Is there a way with the Vault API to read the login information from Visual Studio 2010 used for the current open project which is under Vault source control? ie. when a project is opened, Visual Studio automatically logs you in based on saved credentials or prompts for a password if not saved. Is this log in information accessible via the api for that same project?

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Retrieve Vault login information from Visual Studio

Post by lbauer » Fri Oct 08, 2010 4:55 pm

If you're using the Visual Studio Enhanced Client, the login information is stored in the user's VsipClientProjectSettings.xml file in the C:\Documents and Settings\username\Local Settings\Application data\SourceGear\VSIPSccClient directory. The user name is in the clear, but the password is encrypted.

I don't think this is accessible from the API.

Perhaps if we knew what you wanted to do, we could provide some suggestions.
Linda Bauer
SourceGear
Technical Support Manager

pjmartins
Posts: 5
Joined: Fri Oct 08, 2010 7:13 am

Re: Retrieve Vault login information from Visual Studio

Post by pjmartins » Mon Oct 11, 2010 8:26 am

I am trying to design a code generator as an add-in to visual studio. If the target file already exists, I am trying to check it out so it can be overwritten. I have tried using EnvDTE's SourceControl.CheckOut, but it seems to only work with VSS (throws a NotImplementedException). Is there another way to achieve this?

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Retrieve Vault login information from Visual Studio

Post by lbauer » Wed Oct 20, 2010 3:26 pm

If the main objective is for the file to be writable, you could use CVS mode, which keeps all working folder files writable.

There's also a setting in the client options to Make all files read-only on Get. This setting is in the Vault Client under Tools->Options->Local Files->Make Writable.
Linda Bauer
SourceGear
Technical Support Manager

Post Reply