Teamcity comes with a NAnt runner: http://confluence.jetbrains.com/display/TCD8/NAnt
The best way to make it work is: - build your own script - test it on your own machine, without teamcity - commit the script into source control - configure teamcity to run it using the NAnt runner
this way in case of future troubles you can always debug your script locally.
Hope it helps.