This may seem most obvious, but why not just use Visual Studio's built-in publishing feature. The VS2010 version has a new call to the web.config trasnsformations function, which allows you to configure various web.config files for dev, test and prod, or something else that you want to call a deployment. When I publish, I select an assembly type, such as Debug or Release, that selects the correct web.config, right-click the project and click publish. Select a server or ftp location and publish. It is very simple.
Am I missing something in your question?
RJ.
source share