R – Is code written in Vista 64 compatible on 32 bit os

64-bitcompatibilitydevelopment-environment

We are getting new dev machines and moving up to Vista 64 Ultimate to take advantage of our 8gb ram. Our manager wants us to do all dev in 32bit virtual machines to make sure there will be no problems with our code moving into production.

Is there any way to guarantee the resultant programs will work on 32bit os's?
I don't mind using virtual machines, but I don't like how they force you back into a "Single" monitor type view. I like moving my VS toolbars off to my other monitor.

EDIT: We are using Visual Studio 2005 and 2008, VB.NET and/or C#

EDIT: Using Harpreet's answer, these are the steps I used to set my Visual Studio IDE to compile x86 / 32bit:

  1. Click Build and open Configuration Manager
  2. Select Active Solution Platform drop down list
  3. Select x86 if it is in the list and skip to step 5, if not Select <New...>
  4. In the New Solution Platform dialog, select x86 and press OK
  5. Verify the selected platform for all of your projects is x86
  6. Click Close.

Enjoy.

Thank you,
Keith

Best Answer

I do development on 64 bit machines for 32 bit Windows. It's not a problem. You should make sure that your projects are set to compile in x86 mode in order to be conservative. You'll want to go through each project in the solution and double check this. You could also use the AnyCPU setting but that's a little riskier since it will run differently on your dev machine than a 32 bit machine. You want to avoid the 64bit mode, of course.

The problems I've run into are drivers that don't work when the app is compiled for 64 bit (explicitly 64 bit or AnyCPU compiled and running on 64 bit Windows). Those problems are completely avoidable by sticking with x86 compilation. That should reveal all flaws on your dev machines.

Ideally, you could set up a build and test environment that could be executed against frequently on a 32 bit machine. That should reassure your management and let you avoid the VM as your desktop.