X64, X86, ClickOnce woes

I've just recently joined a team responsible for an established ~6ish year old project and we have a pretty extensive automation framework in place already. I figured the Vista RC/RTM builds were the ideal time to make the transition to a 64bit OS and I fully expected to run into a series of 64-bit related woes... but I'm running into them more at work than at home, which is about the opposite of what I expected :)

The previously mentioned project has a lot of automation code written for it. Of this, only a handful of the automation code has been brought into Team Suite, but this particular automation code is responsible for automating user input on a client application targeted for "Any CPU". This results in Visual Studio trying to run its tests from a 32bit process against an application that starts running as a 64 bit application. The automation code starts up the application by pointing to a ClickOnce deployment file, which starts the AnyCPU build.

In the meantime, I've gotten the source for the tool being automated, created an x86 version of the assembly, modified the automation code to start my custom x86-specific build of the application, and I'm able to get around. However, this isn't really ideal as the automation code is used by several other people. I can try to be clever with #ifndef and have a chunk of code just for me, but this doesn't really seem ideal.

So now, I'm knee-deep in trying to set up a custom ClickOnce deployment that installs the X86 build instead of the MSIL build. The idea being I can create a custom define in my code to point to the right deployment based on the current machine's architecture on a day far from today when VS runs natively as a 64bit application. :)

The whole VS running as 32bit on a 64bit machine seems like it would be a very common problem with a lot of solutions in place already, but I haven't found the right people. I've emailed a few discussion groups, completely expecting an "Oh, yeah, this is how we got around that issue", but it never came. I know I have no readers, but... thoughts? :)

In other news, I'm currently in a raging war for the Building 6 Xbox360 leaderboards. I was overtaken during the weekend, but I have some King Kong achievements waiting to help me retake first place.