Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用Powershell和Visual Studio 2019查询TFS 2015源代码存储库 我试图用VisualStudio 2019创建一个PopeScript脚本,它访问一个特定的Team Foundation Server 2015团队项目及其分支之一。目标是返回在特定时间段内创建或修改的文件的名称。要实现这一点,我的印象是必须筛选.CreationTime和.LastWriteTime属性_Powershell_Tfs 2015_Visual Studio 2019 - Fatal编程技术网

使用Powershell和Visual Studio 2019查询TFS 2015源代码存储库 我试图用VisualStudio 2019创建一个PopeScript脚本,它访问一个特定的Team Foundation Server 2015团队项目及其分支之一。目标是返回在特定时间段内创建或修改的文件的名称。要实现这一点,我的印象是必须筛选.CreationTime和.LastWriteTime属性

使用Powershell和Visual Studio 2019查询TFS 2015源代码存储库 我试图用VisualStudio 2019创建一个PopeScript脚本,它访问一个特定的Team Foundation Server 2015团队项目及其分支之一。目标是返回在特定时间段内创建或修改的文件的名称。要实现这一点,我的印象是必须筛选.CreationTime和.LastWriteTime属性,powershell,tfs-2015,visual-studio-2019,Powershell,Tfs 2015,Visual Studio 2019,我已使用[Microsoft.TeamFoundation.Client]API成功访问了项目集合,但在使用版本控制存储库实例化[Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer]时无法访问单个团队项目。已确保身份验证,但没有vcs方法识别存储库路径。(我故意在下面的代码中省略了程序集声明。) 根据共享代码,您试图获取错误的项目路径 http://tfs.infosys.com:8080/tfs/collect

我已使用[Microsoft.TeamFoundation.Client]API成功访问了项目集合,但在使用版本控制存储库实例化[Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer]时无法访问单个团队项目。已确保身份验证,但没有vcs方法识别存储库路径。(我故意在下面的代码中省略了程序集声明。)


根据共享代码,您试图获取错误的项目路径

http://tfs.infosys.com:8080/tfs/collection/project/_git/Enterprise
这看起来像是git repo门户网站中的url

但是,您的代码用于TFVC版本控制。项目路径应该是
$/MyFirstProject/Main-branch2.0-child1

您可以使用以下内容在团队项目中查找Git回购:

GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}?api-version=4.1
您可以使用GET Invoke RestMethod在Powershell中执行REST API,有关Powershell REST API编程,请参阅以下链接:


我可以使用Microsoft.TeamFoundation.SourceControl.WebAPI库访问GitItem类。这将返回文件级属性。
GET https://dev.azure.com/{organization}/{project}/_apis/git/repositories/{repositoryId}?api-version=4.1