Hi,
I'm using Vault 4.1.0.16216, and am writing a Visual Studio 2008 package which needs to be able to remove a file from a project, including from source control. When I remove a file from a project programmatically, it ends up listed as "missing" in Vault after checking all changes back in, whereas if I remove it manually using the Visual Studio menu command, it is correctly deleted from Vault. Therefore I am wondering if there is any API or command line utility that I can use to delete the file from Vault in my code; the deleted file is correctly removed from the project in both cases; to remove the file in code I'm using the IVsProject2.RemoveItem method. If anybody has any ideas about how I might accomplish this, I'd be grateful.
Cheers,
Dave Harrington.
Deleting a file programmatically
Moderator: SourceGear
Re: Deleting a file programmatically
You should be able to use the Vault command-line client to delete the file:
Code: Select all
"c:\program files\sourcegear\vault Client\vault.exe" -host myvaultserver -username user -password mypassword -repository "Repository Name" c:\path\to\file.txt -commit
Subscribe to the Fortress/Vault blog
-
- Posts: 4
- Joined: Mon Nov 03, 2008 5:00 am
Re: Deleting a file programmatically
Jeremy,
Thanks, I will try that out - I guess it's not ideal as I'll need to store the server/username/password details somewhere, as well as decide whether the file is under source control in the first place, but it would work.
Cheers,
Dave Harrington.
Thanks, I will try that out - I guess it's not ideal as I'll need to store the server/username/password details somewhere, as well as decide whether the file is under source control in the first place, but it would work.
Cheers,
Dave Harrington.
Re: Deleting a file programmatically
Hope this helps.
Linda Bauer
SourceGear
Technical Support Manager
SourceGear
Technical Support Manager