これに近づくには2つのことがあります。
最初に、ソース フォルダーをビルド中心のレイアウトにする必要があります。これにより、可能な限り重複を排除できます。
ビルドをトリガーしない特定の共有フォルダーが必要な場合は、ソース マッピングに含めないでください。代わりに、ビルドの初期段階でファイルをワークスペースにダウンロードするスクリプトを追加してください。
Visual Studio のバージョンに合わせて例を更新する必要があります。また、ソース ディレクトリをスクリプトに渡す必要があります。
REM %1 represents the Sources directory
REM Compute variables
SET TfExe="%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe"
REM SET TfExe="C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe"
Set RefPath="$/TFS BUILDS/Shapes/Main/Includes"
Set localPath="%~1\Includes"
REM set the Drive Letter for this build
Set Localdrive=%localPath:~1,2%
%Localdrive%
cd %1
REM Map the folders
%TfExe% workfold /map %RefPath% %localPath%
REM Get the required content
%TfExe% get %RefPath%
REM Unmap the folders
%TfExe% workfold /unmap %RefPath%