Macros and outputs using build agents for visual studio 2010

415 views Asked by At

I'm trying to get team build and build agents working for our app for the first time. I've run into a few issues with the way we do our project settings which don't work well for build agents that I'm trying to clean up. However I'd like to ask about the issues I've "discovered" about build agents and how they work to see if I'm correct, or if I'm just missing obvious things that would make it easier. So here are the things that I have hit so far, please tell me if I am correct or correct me where I'm wrong:

1) Build agents change the $(Outdir) macros to send everything to the Binaries. This means that if we had projects sending our output to a custom folder like ....\bin, and a post build step that references ....\bin the post build step will fail because on the build agent the output won't be in bin. We now have to use a post build step to copy from $(Outdir) to ....\bin to get the output where we want it.

2) The Linker->General->Register Output does not work for an x64 build on any machine as it seems to be not smart enough to use the system32 regsvr32 for x64 and instead tries to use the 32bit version.

3) The Linker->General->Register Output does not work for a Win32 build on a build agent because it's not smart enough to use the $(Output) folder and instead tries to register the file from .\$(Platform)\$(Configuration)\filename.dll but the file isn't there on a build agent.

To solve issues 2 and 3 I've switched to using a post build registration step to register our dlls, so either:

c:\windows\syswow64\regsvr32.exe  $(TargetPath) //32 bit
c:\windows\system32\regsvr32.exe  $(TargetPath) //64 bit  

I would love to find a macro to replace syswow64 and system32 that would just use the correct one depending on the platform to make these lines the same (i prefer to have my post build steps identical for all platforms and configurations as much as possible) but so far i can't find one.
I find it impossible to believe that there wouldn't be a $(SystemFolder) macro or something like that can someone tell me if there is one and where/what it is?

Also are there any other hidden issues like this that I may run into? Thanks for all your help.

0

There are 0 answers