views:

89

answers:

1

in my csproj the OutputPath is set as the following:

<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DefineTrace>true</DefineTrace>
<OutputPath>bin\x86\Release\</OutputPath>
....
</PropertyGroup>

in my nant script, I have this:

<msbuild project="${demo.solution}">
 <property name="Configuration" value="release"/>
        <property name="OutputPath" value="${output.dir}"/>
        <property name="Platform" value="x86"/>
</msbuild>

why is the log showing that the DemoProject.dll is copied from obj\x86\release?

....

[msbuild] Project "Demo.sln" (1) is building "DemoProjec1.vbproj" (3) on node 0 (default targets).

[msbuild] Copying file from "obj\x86\Release\DemoProjec1.dll" to ${output.dir}\DemoProjec1.dll".

[msbuild] DemoProjec1 -> ${output.dir}\DemoProjec1.dll

[msbuild] Done Building Project "DemoProjec1.vbproj" (default targets).

....

Somehow the DemoProject.dll from obj is different in size compared to DemoProject.dll from bin

+2  A: 

obj\x86\release is the IntermediateOutputPath for release configuration.

Your project is compiled in the intermediate directory and then the result file is copied in your output directory. In you Nant file you override the OutputPath to ${output.dir} so your file is copied from obj\x86\release to ${output.dir}.

madgnome
Thanks for your detailed reply madgnome. I see where I got it wrong. However I still don't understand how can the size of the output file be different from obj and from bin. It happens to some projects and some particular output files randomly.
Ron Ling