开发者

OutputPath is set to be bin\x86\release, but shown as obj\x86\release when using MSBuild

开发者 https://www.devze.com 2023-01-13 02:36 出处:网络
In my .csproj file (C# project file) 开发者_开发百科OutputPath is set as in the following: <PropertyGroup Condition=" \'$(Configuration)|$(Platform)\' == \'Release|x86\' ">

In my .csproj file (C# project file) 开发者_开发百科OutputPath is set as in 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.


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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消