有没有办法通过FTP的HTTP在TFS中下载最新版本的文件?例如,http://server:8090/tfs/path/to/file.cs
当您浏览TFS(使用类似于上面的URL)时,它会在浏览器中的页面框架中打开文件,我正在尝试打开物理文件的完整内容。有一个下载按钮,但我正在寻找一个直接使用的URL。
答案 0 :(得分:1)
您可以使用REST API下载最新版本的文件:
对于TFVC:(Items - Get)
GET http://server:8080/tfs/DefaultCollection/{Project}/_apis/tfvc/items?download=true&path=<File Path>
e.g:
http://server:8080/tfs/DefaultCollection/{ProjectName}/_apis/tfvc/items?download=true&path=$/Scrum-TFVC/DownloadT/DownloadT/Program.cs
对于Git:(Items - Get)
GET http://SERVER:8080/tfs/DefaultCollection/{ProjectName}/_apis/git/repositories/{repository name or ID}/items?download=true&scopepath=<File path>
e.g:
http://server:8080/tfs/DefaultCollection/Git-Scrum/_apis/git/repositories/389e8215-1fb2-4fdc-bd04-ebc8a8a4410e/items?download=true&scopepath=/WebApp01/WebApp01/Startup.cs
答案 1 :(得分:-1)
如果您在线使用TFS,则可以使用http https://your_company.visualstudio.com
根据TFS文档,您应该能够通过Web浏览器连接TFS:
查看doc:https://docs.microsoft.com/en-us/vsts/user-guide/connect-team-projects?view=vsts
请查看“从门户网站连接”部分