我们目前正在迁移从XAML建立到vNext(TFS2017)。 “正常”建立做工精细,但为我们的LicenseManager有不起作用。 含有LicenseManager有源代码的文件夹只能从特定用户访问。 所以我配置了一个vNext建立代理,其中构建服务上能够访问源代码的帐户运行(就像我们用XAML构建所做的那样)。 我使用的功能和需求,迫使LicenseManager有建立在该代理。
但GetSources任务不下载LicenseManager有源代码。 这些都是在GetSources任务使用的命令:
tf vc workspace /new /location:local /permission:Public ws_1_12 /collection:http://tfs:8080/tfs/DefaultCollection/ /loginType:OAuth /login:.,******** /noprompt
tf vc workfold /unmap /workspace:ws_1_12 $/ /collection:http://tfs:8080/tfs/DefaultCollection/ /loginType:OAuth /login:.,******** /noprompt
tf vc workfold /map /workspace:ws_1_12 $/TPA/BuildVNext/1.7 D:\b\a1\_w\1\s\TPA\BuildVNext\1.7 /collection:http://tfs:8080/tfs/DefaultCollection/ /loginType:OAuth /login:.,******** /noprompt
tf vc workfold /map /workspace:ws_1_12 $/TPA/LicenseMgr/dev/main D:\b\a1\_w\1\s\TPA\LicenseMgr\dev\main /collection:http://tfs:8080/tfs/DefaultCollection/ /loginType:OAuth /login:.,******** /noprompt
tf vc workfold /map /workspace:ws_1_12 $/TPA/DevTools/internal/BuildHelper/1.6 D:\b\a1\_w\1\s\TPA\DevTools\internal\BuildHelper\1.6 /collection:http://tfs:8080/tfs/DefaultCollection/ /loginType:OAuth /login:.,******** /noprompt
tf vc workfold /map /workspace:ws_1_12 $/TPA/DevTools/internal/ReferenceManager/1.9 D:\b\a1\_w\1\s\TPA\DevTools\internal\ReferenceManager\1.9 /collection:http://tfs:8080/tfs/DefaultCollection/ /loginType:OAuth /login:.,******** /noprompt
tf vc workfold /map /workspace:ws_1_12 $/TPA/DevTools/external/MsBuild/ExtensionPack/4.0.9 D:\b\a1\_w\1\s\TPA\DevTools\external\MsBuild\ExtensionPack\4.0.9 /collection:http://tfs.:8080/tfs/DefaultCollection/ /loginType:OAuth /login:.,******** /noprompt
tf vc get /version:178702 /recursive /overwrite D:\b\a1\_w\1\s /loginType:OAuth /login:.,******** /noprompt
除了“LicenseMgr \ dev的\主”(这是一个限制访问)的所有文件夹获取下载。 但是,当我打开VisualStudio中,选择在编译过程中创建的工作区,并选择“获取最新”,它下载代码没有任何问题。
任何帮助表示赞赏!
顺祝商祺贝恩德
编辑:我添加了一个简单的批处理脚本到d:构建计算机的驱动器,并运行该脚本的GetSources任务完成后。 这并下载所有源代码!
这是脚本:
tf vc workspace /new /location:local /permission:Public %BUILD_REPOSITORY_TFVC_WORKSPACE% /collection:http://tfs.net:8080/tfs/DefaultCollection/ /noprompt
tf vc workfold /unmap /workspace:%BUILD_REPOSITORY_TFVC_WORKSPACE% $/ /collection:http://tfs.net:8080/tfs/DefaultCollection/ /noprompt
tf vc workfold /map /workspace:%BUILD_REPOSITORY_TFVC_WORKSPACE% $/TPA/BuildVNext/1.7 D:\b\a1\_w\1\s\TPA\BuildVNext\1.7 /collection:http://tfs.net:8080/tfs/DefaultCollection/ /noprompt
tf vc workfold /map /workspace:%BUILD_REPOSITORY_TFVC_WORKSPACE% $/TPA/DevTools/internal/BuildHelper/1.6 %BUILD_SOURCESDIRECTORY%\TPA\DevTools\internal\BuildHelper\1.6 /collection:http://tfs.net:8080/tfs/DefaultCollection/ /noprompt
tf vc workfold /map /workspace:%BUILD_REPOSITORY_TFVC_WORKSPACE% $/TPA/DevTools/internal/ReferenceManager/1.9 %BUILD_SOURCESDIRECTORY%\TPA\DevTools\internal\ReferenceManager\1.9 /collection:http://tfs.net:8080/tfs/DefaultCollection/ /noprompt
tf vc workfold /map /workspace:%BUILD_REPOSITORY_TFVC_WORKSPACE% $/TPA/DevTools/external/MsBuild/ExtensionPack/4.0.9 %BUILD_SOURCESDIRECTORY%\TPA\DevTools\external\MsBuild\ExtensionPack\4.0.9 /collection:http://tfs.net:8080/tfs/DefaultCollection/ /noprompt
tf vc workfold /map /workspace:%BUILD_REPOSITORY_TFVC_WORKSPACE% $/TPA/LicenseMgr/dev/main %BUILD_SOURCESDIRECTORY%\TPA\LicenseMgr\dev\main /collection:http://tfs.net:8080/tfs/DefaultCollection/ /noprompt
tf vc get /version:%BUILD_SOURCEVERSION% /recursive /overwrite %BUILD_SOURCESDIRECTORY% /noprompt
正如我所说的,这并下载所有的来源,但看看错误信息,尤其是工作区的帐户信息:
D:\b\a1\_w\1\s>tf vc workspace /new /location:local /permission:Public ws_1_12 /collection:http://tfs.net:8080/tfs/DefaultCollection/ /noprompt
The path D:\b\a1\_w\1\s\TPA\BuildVNext\1.7 is already mapped in workspace ws_1_12;Build\beb2741f-e779-4a6f-a20e-033796fec5b7.
D:\b\a1\_w\1\s>tf vc workfold /unmap /workspace:ws_1_12 $/ /collection:/collection:http://tfs.net:8080/tfs/DefaultCollection//noprompt
TF14061: The workspace ws_1_12;Build_LicenseMgr does not exist.
D:\b\a1\_w\1\s>tf vc workfold /map /workspace:ws_1_12 $/TPA/BuildVNext/1.7 D:\b\a1\_w\1\s\TPA\BuildVNext\1.7 /collection:/collection:http://tfs.net:8080/tfs/DefaultCollection/ /noprompt
TF14061: The workspace ws_1_12;Build_LicenseMgr does not exist.
D:\b\a1\_w\1\s>tf vc workfold /map /workspace:ws_1_12 $/TPA/DevTools/internal/BuildHelper/1.6 D:\b\a1\_w\1\s\TPA\DevTools\internal\BuildHelper\1.6 /collection:/collection:http://tfs.net:8080/tfs/DefaultCollection/ /noprompt
TF14061: The workspace ws_1_12;Build_LicenseMgr does not exist.
D:\b\a1\_w\1\s>tf vc workfold /map /workspace:ws_1_12 $/TPA/DevTools/internal/ReferenceManager/1.9 D:\b\a1\_w\1\s\TPA\DevTools\internal\ReferenceManager\1.9 /collection:/collection:http://tfs.net:8080/tfs/DefaultCollection/ /noprompt
TF14061: The workspace ws_1_12;Build_LicenseMgr does not exist.
D:\b\a1\_w\1\s>tf vc workfold /map /workspace:ws_1_12 $/TPA/DevTools/external/MsBuild/ExtensionPack/4.0.9 D:\b\a1\_w\1\s\TPA\DevTools\external\MsBuild\ExtensionPack\4.0.9 /collection:/collection:http://tfs.net:8080/tfs/DefaultCollection/ /noprompt
TF14061: The workspace ws_1_12;Build_LicenseMgr does not exist.
D:\b\a1\_w\1\s>tf vc workfold /map /workspace:ws_1_12 $/TPA/LicenseMgr/dev/main D:\b\a1\_w\1\s\TPA\LicenseMgr\dev\main /collection:/collection:http://tfs.net:8080/tfs/DefaultCollection/ /noprompt
TF14061: The workspace ws_1_12;Build_LicenseMgr does not exist.
D:\b\a1\_w\1\s>tf vc get /version:178749 /recursive /overwrite D:\b\a1\_w\1\s /noprompt
D:\b\a1\_w\1\s\TPA\LicenseMgr\dev:
Getting main
EDIT2:为了使我的工作,构建我只需要在批处理脚本一行:
tf vc get /version:%BUILD_SOURCEVERSION% /recursive /overwrite %BUILD_SOURCESDIRECTORY% /noprompt
所以/ loginType:OAuth的原GetSources的任务导致问题对我来说。 没有/ loginType同样的命令不工作!