We had a Project in our solution called DatabaseCreation – which was responsible for creating the database and running the scripts (contained in directories within the project).
Everything was fine.
We then wanted to make the creation of this database to be available from an app and from a console, so re-factored so that we had …
-
DatabaseCreation.Core
-
DatabaseCreation.App
-
DatabaseCreation.Console
Core has the directories containing scripts, and the App and Console run them.
When built with Visual Studio the directories containing the scripts are copied to the Output bin directory (either App or Console) but problem is: when the build server runs, the script directories don’t get copied to the bin folder.
We’ve tried with TFS and Team City. I realise I could just copy them over, but its frustrating that it works when building in Visual Studio!
Can anyone put me on the right track please?
The files were set to copy always, but the build just wouldn’t pick them up.
The slightly awkward work around was to add the files as links from one project to another.
Add Existing -> navigate to other project – Looking for the little arrow on the right of the add button -> press that, Add as link option appears.