I would like to automate code-first database generation during the automated CI build of a web project in Team Foundation Server 2010.

When run locally the tests create a code-first database specified by the connection string in the app.config of the tests project. How do I configure the TFS Build Configuration to mimic this behaviour on the TFS build server?

  • what currently happens when tests are run on the build server? – Betty Oct 4 '12 at 8:34

The problem, it turns out, was that the TFS build server was successfully running the test which was using the default connection string in the app.config which pointed to the local SQL Server, not where I expected it.

The solution was to use SlowCheetah on the TFS server as a means to transform the App.config file using the QA transform as per this blog article.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.