0

I am using following command in NAnt build file

<msbuild project="${appsdest}\${targetname}\${targetname}.sln"/>

appsdest and targetname are variable contain application project path and targetname is the variable contain project name to be rebuild.

but when using this command it build the solution but the time stamp of dlls are not updated.

I need to rebuild the solution and the latest dlls need to be place in debug folder.

can anyone tell me how to rebuild the solution using the msbuild command as written above?

Thanks

JoseK
  • 31,141
  • 14
  • 104
  • 131
SCM
  • 2,065
  • 2
  • 14
  • 15

2 Answers2

0

You need to use the 'Rebuild' target:

<msbuild project="${appsdest}\${targetname}\${targetname}.sln" target="Rebuild"/>
Alexander Yezutov
  • 3,144
  • 2
  • 21
  • 23
0

I don't use the MSBUILD tasks in NAnt, I just call the msbuild executable directly and it has worked well for me.

<target name="build">
  <exec program="${MSBuildPath}">
    <arg line='"${SolutionFile}"' />
    <arg line="/property:Configuration=${SolutionConfiguration}" />
    <arg value="/target:Rebuild" />
    <arg value="/verbosity:normal" />
    <arg value="/nologo" />
    <arg line='/logger:"C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll"'/>
  </exec>
</target>

I write more about it here: http://enterpriseyness.com/2009/12/continuous-integration-with-cruise-control-net-nant

Babak Naffas
  • 12,395
  • 3
  • 34
  • 49