views:

181

answers:

1

Hi Guys,

I have a solution which contains a project with a reference to a library that creates PDF files. The PDF library has a 32 bit version and a 64 bit version. During development, the project references the 32 bit version.

I am developing on a 32 bit machine. I have Cruise Control triggering a build every time I check something into my source control. The build server is a 32 bit machine.

Unfortunately, the code also has to be deployed to 64 bit machines. All of my code is managed and runs fine on the 64 bit machines, so it is just this PDF library that is causing a problem.

I think I need to create a Cruise Control project, which, on check in, opens the project file, replaces the reference to the 32 bit PDF DLL with a reference to the 64 bit version, then performs a build (Creating a build ready for a 64 bit machine).

Does anyone have any advice on the best way to go about doing this? My initial plan was to create a prebuild step, something like:

[prebuild] [exec] [baseDirectory]E:\Dev\CommonCode[/baseDirectory] [executable]Replace32DllWith64Dll.cmd[/executable] [/exec] [/prebuild]

Which runs a .cmd file to do the replace, but I have no idea how to put the cmd file together, and am not sure if this would work anyway... Perhaps there is a more standard way for doing this sort of thing?

Any pointers would be much appreciated...

Thanks,

Paul

A: 

Ok, managed to solve this little conundrum:

Basically I created a quick and dirty VBScript which simply opens my project files, and replaces paths to the 32 bit DLL reference with paths to the 64 bit DLLs. I used a batch file to fire the VBScript.

I then updated the Cruise Control config file to tell the build process to execute the batch file, just before MSBuild does it's work.

Seemed to work well for me...

A full write up with further details and the actual scripts is available:

http://webpangea.blogspot.com/2009/09/cruise-control-with-msbuild-switching.html

Hope it helps someone.

Paul

Paul