Open File for edit in Team Version Control.  
Author Message
ddee





PostPosted: Team Foundation Server - Version Control, Open File for edit in Team Version Control. Top

Does anyone know if there is any API for open file for read/write in Team

Thanks.



Visual Studio Team System37  
 
 
Richard Berg MSFT





PostPosted: Team Foundation Server - Version Control, Open File for edit in Team Version Control. Top

Workspace.PendEdit()

client API samples

 
 
ddee





PostPosted: Team Foundation Server - Version Control, Open File for edit in Team Version Control. Top

Thanks for your quick response, Mr. Berg.

I used Workspace.PenEdit() to check out the file. I also had a Open file Button, and want to load this file to a correct format (word, pdf.. ) and edit it on this editor and save it... Do you know how i can do this and also the team Version control can keep track of the history of I open file for edit.

Your help will be appreciated.

Thanks


 
 
Richard Berg MSFT





PostPosted: Team Foundation Server - Version Control, Open File for edit in Team Version Control. Top

If you use the shell to execute the file, it should open in the correct editor. In C# you could use System.Diagnostics.Process.Start()

To track history, you'll need to checkin (Workspace.Checkin()) each version you want to save. So the workflow would go something like PendEdit -> launch editor -> save within editor -> Checkin -> PendEdit -> save within editor -> Checkin -> ...

You could then use VersionControlServer.QueryHistory to show the history.

 
 
ddee





PostPosted: Team Foundation Server - Version Control, Open File for edit in Team Version Control. Top

Thank you so much for your help, Mr Berg. It's exactly what I had been looking for...

Dee


 
 
ddee





PostPosted: Team Foundation Server - Version Control, Open File for edit in Team Version Control. Top

Hi Mr Berg,

It works when I run on local machine... but when I try to run the web site from my local machine, it doesnt open any editor and it doesnt give any error also. Please let me know what is wrong and how do i make it work

Thank you very much,

Dee


 
 
Richard Berg MSFT





PostPosted: Team Foundation Server - Version Control, Open File for edit in Team Version Control. Top

I don't know how to make a website launch arbitrary applications. It's probably prevented by CAS (code access security) unless you enable full trust. That's a question for the ASP.Net forums.