私のチームは大きなソリューション(〜500 csproj's)を持っています。 VS2012を使用し、MSBuild 4を使用するTFS Buildを使用してビルドします。現在、シリアルに構築していますが、(msbuild /maxcpucount:4
を使用して)並列にビルドしたいと考えています。しかし、私は私の4-procのマシン上でそれをしようとしたとき、私は奇妙な失敗を取得:ログを見てMSBuild/m:4は同じプロジェクトを2回構築するため失敗しました
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]
を、2つのMSBuildのノードは、同じcsprojを構築しようとしていたので、いくつかを書くことに衝突します出力:
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).
なぜMSBuildのは二度同じプロジェクトをビルドしようとするのでしょうか?