Problem: I want to elegantly publish an MVC website with NAnt.
Simple no? Wrong... Here are some of the stackoverflow resources I've looked at. Each one of them has an issue...
Stackoverflow 1: Publish WebApplication using NAnt
The result of this one was that the web.config was not being transformed and additional files were showing up in the bin that weren't suppose to like the entity.dll.config of all things!
Stackoverflow 2: Replicate VS2008 "Publish Web Site" from command line
This one will do the same as the previous solution except it's even worse... it will copy EVERYTHING from my project and dump it into the publish folder... no joke!
Stackoverflow 3: MSBuild Script and VS2010 publish apply Web.config Transform
The accepted solution builds on top of Stackoverflow 1, but is pure MsBuild xml and not NAnt xml. It also only fixes the Webconfig and so still leaves those random files that show up. There is also another solution (not accepted) that pattersonc gives, which is very, very close to correct but the connection strings in the web.config are in a bogus limbo state, leaving you with yet another bad web.config
Needless to say it's been 3-4 days, 10+ different StackOverFlow answers and no silver bullet... Is there no easy solution? Must I commit some cardinal sin and create some horribly messed up NAnt script to achieve the correct publish results that VS2010 delivers so nicely?