I have two repositories - one in TFVC and another in Git. There are specific technical reasons for keeping them separate.
The code in TFVC is built on a private buil
And the inverse of Marina's answer is also possible. After binding your build definition to Git by default, you can add a powershell script to map a workspace and fetch the sources:
tf workspace /new /noprompt /location:local /permission:private
tf workfold /map $/Server/Path "$(Agent.BuildDirectory)\tfvc" /workspace:
tf get "$(Agent.BuildDirectory)\tfvc"
And add a "always run task" to clean up the workspace afterwards:
tf workspace /delete
rd /s /q "$(Agent.BuildDirectory)\tfvc"
Another option is to use the Download Artefact task to download the artifacts from the following extension: TFS Artifacts for Release Management.
Or the Download Artifact task that comes with VSTS, though that one requires a link to a Build Definition to download from, which means you could have a CI build on either Git or TFVC that build the sources, or simply attaches the sources directory, then fetch those in the "other" build.