It was with much tinkering that we finally found how to deploy a database with data from CSV files. However, that trick only applied locally. The pre/post-build event macro that copied files can only be hardcoded to a local path since $(TargetDir) somehow does not work in the macro and different build configurations do not allow different macros.
If we wanted to deploy to a remote server, say SIT or UAT, copying the CSV files to a local drive location in the server becomes a manual process. In other words, one-click deployment direct with Visual Studio would not work.
We are trying to find a way to extend this method for the convenience of remote server deployment. Any suggestions to improve this appreciated. Thanks.
The melody of logic will always play out the truth. ~ Narumi Ayumu, Spiral
In the end, I got around it manipulating SQLCMD variables in the project and Build events macro.
http://icelava.net/forums/2757/ShowThread.aspx#2757