0
當我們使用msbuild.exe從命令行構建Visual Studio 2010數據庫項目時,它有時可能會從同一命令行運行兩次。MSBuild .dbproj似乎運行兩次
我們從nAnt腳本中調用msbuild,並調用'Build'目標。我們的數據庫項目非常龐大,因此可能需要大約4分鐘才能完成一次。當它運行兩次時,我們的數據庫構建需要8分鐘。
這是我們用來調用構建的exec部分。它運行在只包含一個.dbproj的.sln文件中。
<exec program="${framework::get-tool-path('msbuild.exe')}" append="true" failonerror="true" verbose="true">
<arg value="${database.sln}" />
<arg value="/p:OutputPath=${build.output.database}" />
<arg value="/nologo" />
<arg value="/t:Build" />
<arg value="/p:Configuration=Release" />
<arg value="/p:WorkingDir="."" />
<arg value="/verbosity:normal" />
<arg value="/v:m" />
</exec>
輸出我們得到的模樣
Creating a model to represent the project...
Loading project references...
Loading project files...
Building the project model and resolving object interdependencies...
Validating the project model...
(x) problems have been detected.
[a list of warnings based on the db analysis]
The results are saved in (y).
Creating a model to represent the project...
Loading project references...
Loading project files...
Building the project model and resolving object interdependencies...
Validating the project model...
(x) problems have been detected.
[a list of warnings based on the db analysis]
The results are saved in (y).
誰能幫助,爲什麼目標好像是叫兩次(只是有時 - 我還沒有想通了,爲什麼只是偶爾)。該腳本始終運行在一個空的文件夾結構中,因此從前一次運行構建中不會留下構建輸出。
非常感謝,增加了額外的詳細程度揭示了原因 – 2012-02-07 12:48:39