In the project I am currently working with, we heavily uses the post build event and relative path references. i.e. we have all the inter-solution references implemented as dll reference with relative path where the referencing solution uses the post build event to drop binary to.
This works well in the visual studio enviornmnet, now we are looking to a automatic way of building the source code and create daily binary drops. The TFS build does not seem to play well with the relative path reference.
Is there any quick solution to this? I cannot believe this is so complicated as all we need is to just schedule a build to get the latest of source code, build it as to visual studio definition and drop the binaries to a shared folder.
Thanks a lot
I have seen quite a few projects that use post build events break when used with TFS Build System. This problem usually arises from the different in the way Visual Studio passes the $(OutDir) variable to MSBuild engine than how TFS Build engine does it. Essentially when you compile within Visual Studio, the $(OutDir) path is (usually) set to bin\debu or bin\release whereas within the TFS BUild System it gets set to the Binaries directory on the build machine where the build happens.
If this is what is blighting your builds then there are a couple of ways to fix this
Approach 1
..\bin\release etc. instead anywhere that you use bin\debug or
bin\release use $(OutDir)
that is being built use $(SolutionDir) or $(solutionPath)
your build scripts
Approach 2
uses the visual studio mode of compilation. You should not have to
change your post build events for this to work.