[background]
Web deployment rookie here trying to set up my first deployment project. I created a "QA" build configuration and want to replace the connectionStrings section of web.config.
I created a file called QAconn.config that contains the QA version of my connectionStrings section. Set up the config replacement on the Deployment Page of the WD project and it "just worked"!
[/background]
Here's my question: I would rather not have the QAconn.config file included in my built website and I'd like to exclude the source safe files. I added ExcludeFromBuild commands to the .wdproj file as specified in Using Web Deployment Projects with VS2005.
If I hard code the file path to the files using the path to my working directory, the files are not excluded. If I use the $(SourceWebPhysicalPath) syntax, I get an error during my build:
Error 71 QAConn.config(1): Could not find file 'C:\Sites\Demo\QA\QAConn.config'.
The path in the error is the Output Folder for my deployment.
Is the replacement .config file being blocked from deployment before it is used for config replacement? I created the .config file w/in my VS website project and it currently lives in the same directory as the web.config file. Is there a better place to put this file?
Thanks!
Kevin