microsoft / vss-web-extension-sdk

Visual Studio Teams Service Web Extension SDK
https://www.visualstudio.com/docs/integrate/extensions/overview
MIT License
133 stars 87 forks source link

VSTS Extension: How to read and write xml config files from users machine. #92

Open Siva150790 opened 6 years ago

Siva150790 commented 6 years ago

I'm creating a VSTS extension where i need to change work item filed values based on Users configuration. Each user has (Individual)specific configuration files in their local machine, and my extension should read that configuration file and update the work items.

I'm not finding a way to read XML files from local machine. Data Storage mentioned in the below link is not helpful (https://docs.microsoft.com/en-us/vsts/extend/develop/data-storage?view=vsts) as user cannot visualize or edit the data.

Help me with some .net samples using REST Api's for accomplishing the above requirement.

mohitbagra commented 6 years ago

VSTS extensions are web apps that run on browser, so they cant access files from user machine unless user manually uploads them via some UI in your extension. You can still store xml as a string in Extension data storage and show them in some kind of "code formatter" (like Monaco editor) to make it look pretty.

Siva150790 commented 6 years ago

Thanks for the clarification. while uploading the config files from extension, where the file will be stored physically? Can we upload file to TFS Version control(source control) through VSTS Extension?

Please send me some code samples.