R – NAnt script for C++ project build automation

build-processnant

Could anyone provide any example of NAnt script for C++ project build automation?

Thanks!

Best Answer

If you're talking Microsoft Visual C++ then I think you get the most control by shelling out msbuild.exe from the nant script and passing it your solution file on the command line. This is supported in Visual Studio 2005/.Net Framework 2.0 and above. e.g.:

<property name="msbuild.dir" value="C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727" />

...

<exec program="${msbuild.dir}\MSBuild.exe"
    commandline="/p:Configuration=Release .\MySolution.sln" 
/>

It will build everything in your solution regardless of language (c#, VB, C++, etc)

Mike