Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is code written in Vista 64 compatible on 32 bit os?

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

like image 381
Keith Sirmons Avatar asked Aug 27 '08 16:08

Keith Sirmons


People also ask

Can a 64-bit program run on 32-bit Windows?

Basically, due to the limit of 32-bit and 64-bit Windows operating systems, you can't run software, applications, and programs on Windows 10/8/7, even Vista, XP that doesn't match its version. In a word, you can't install and run 64-bit software on a 32-bit computer, or vice versa.

Is Vista 32-bit or 64-bit?

Windows Vista optical media use a holographic design with vibrant colors. With the exception of Windows Vista Starter, all editions support both IA-32 (32-bit) and x64 (64-bit) processor architectures.

Can a 32bit system then work with 64bit value?

Yes. The data type is supported on both. But the 64 bit integer isn't native to 32 bit processors. If you use a 64 bit type, and you compile for 64 bit only (you can choose x64 or x86 (=32bit) as a targer), then the compiler might use specific 64 bit instructions, making your application run a bit faster.


1 Answers

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.

like image 127
Harpreet Avatar answered Jan 04 '23 05:01

Harpreet