La mia squadra ha una soluzione di grandi dimensioni (~ 500 csproj's). Usiamo VS2012 e costruiamo usando TFS Build, che usa MSBuild 4. Attualmente costruiamo in serie, ma vogliamo costruire in parallelo (usando msbuild /maxcpucount:4
). Tuttavia, quando ho provato sulla mia macchina 4-process, ottengo un errore strano:MSBuild/m: 4 non riesce perché crea lo stesso progetto due volte
11:2>CSC : fatal error CS0042: Unexpected error creating debug information file 'C:\Common\obj\Debug\Common.PDB' -- 'C:\Common\obj\Debug\Common.pdb: The process cannot access the file because it is being used by another process. [C:\Common\Common.csproj]
Guardando il registro, 2 nodi MSBuild stavano cercando di costruire quella stessa csproj, e si scontrano quindi sulla scrittura di alcuni uscita:
10>Project "C:\Utils\Utils.csproj" (10) is building "C:\Common\Common.csproj" (11) on node 4 (default targets).
46:2>Project "C:\Objects\Objects.csproj" (46:2) is building "C:\Common\Common.csproj" (11:2) on node 1 (default targets).
Perché MSBuild cercare di costruire lo stesso progetto due volte?