<p>I am working on a big C++ project. It is building using single Ant script which makes possible to compile the same source targeting more than one platform and compiler.</p>

<p>But, I have to work only for Windows platform and Visual Studio 2005 C++ compiler. It would be really nice if I could write code and compile in Visual Studio, instead of using Notepad++ and Ant scripts, as I do now.</p>

<p>I tried to install Nant and Nant addin for Visual Studio 2005, and to use existing Ant script, but it seems that Ant script cannot be used as a Nant script.</p>

<p>Is there any way to convert Ant script to Nant? Is any other approach to the problem at all, or I must create Visual Studio solution and projects manually?</p>

<p>I would try to avoid such solution because I have a bunch of tests that I don't know how to use in that case.</p>

To my knowledge, there is no
automatic
way of converting Ant script to NAnt. However, since NAnt is based off of the Ant the conversion process would not be too far from the original, as long as the tasks are the "core" ones. Possibly an XSLT translation could be made on the Ant scripts to convert to NAnt as both are XML. If one were to go down this path the conversion should be done
dynamically
based of the original Ant scripts, so that only one set of scripts would have to be maintained.
If you would like to write and compile your C++ code inside of Visual Studio it's tough to beat the functionality that is built in with the IDE. However, this requires creating project files though. Otherwise, it seems that one would risk fighting an uphill battle with the tool.
One option for the tests would be to call out through a
custom build step
to run them.