2017-01-30 12 views
3

私たちは、C#とC++/CLIの混合ソリューションを用意しています。 devenv作品でビルドすると、MSBuildの依存関係の問題をデバッグする方法は?

msbuild /nr:false /t:Rebuild /p:Configuration=Release /p:Platform=x64 Solution.sln 

でビルドできますが、/ mを追加すると失敗します。たとえば、clやリンクに失敗すると、.pchまたは.objが既に使用されています。

1>Project "Solution.sln" (1) 
is building "a.vcxproj" (34) on node 2 (default targets). 
34>Project "a.vcxproj" (34) 
is building "b.vcxproj" (43:2) on node 5 (default targets). 
33>Project "c.csproj" (33) 
is building "c.csproj" (33:2) on node 6 (ResolveReferences;_CopyFilesMarkedCopyLocal target(s)). 
33:2>Project "c.csproj" (33:2) 
is building "d.csproj" (41) on node 2 (default targets). 
41>Project "d.csproj" (41) 
is building "d.csproj" (41:2) on node 2 (ResolveReferences;_CopyFilesMarkedCopyLocal target(s)). 
41:2>Project "d.csproj" (41:2) 
is building "b.vcxproj" (43) on node 2 (default targets). 

:診断出力を介して

は、私はいくつかのプロジェクトが何らかの理由で複数回に構築されていることが分かりました。

1>Project "Solution.sln" (1) 
is building "e.vcxproj" (60) on node 5 (default targets). 
1>Project "Solution.sln" (1) 
is building "f.csproj" (69) on node 6 (default targets). 
69>Project "f.csproj" (69) 
is building "f.csproj" (69:2) on node 6 (ResolveReferences;_CopyFilesMarkedCopyLocal target(s)). 
69:2>Project "f.csproj" (69:2) 
is building "e.vcxproj" (60:2) on node 6 (default targets). 

しかしdevenvをはDEPSが権利を取得することができたとき、それはそのように振る舞う理由を私は知りません。

これを修正する方法を理解するために、他のスイッチ/ツール/何かをログで調べる人はいますか?

+0

を掘るよりも良い方法はありませんようにそれはそう一般的にMSBuildの「デバッグ」については? msbuild xxx.proj/maxcpucount:3のようないくつかのプロセスを使用しているだけの場合、結果はどうですか?/dsは詳細な要約を表示し、あなたの側でそれを確認することもできます。その問題のビルドオーダーも確認してください(複数回ビルド):https://blogs.msdn.microsoft.com/visualstudio/2010/12/21/incorrect-solution-build-ordering-when-using-msbuild-exe/ –

+0

/mは8つのインスタンスを使用しますが、それは/ m:2でも起こります。 私は前にその記事を読んだと思います。 ProjectDependenciesの.slnファイルはありません。 64ビットMSBuildバージョンについての段落はまだ有効ですか? – Trass3r

+0

ミックスソリューションにこの問題があるかどうか32ビット版または異なるプラットフォームターゲットを使用してビルドしていますか?ここでシンプルなサンプルを共有していただけますか? –

答えて