Using Visual Studio 2005 (32bit) on a Windows 7 64bit machine - visual-studio-2005

I need to use Visual Studio 2005 (C++) on my new laptop - a Sony Vaio with Windows 7 64bit..
I don't need to develop for a 64bit environment, my work is all 32bit, so how can I be sure that I can still develop/debug/test for a 32bit target environment using VS2005 on a 64bit machine....?
What's the best option:
1) Just install VS2005 on Windows 7 64bit and carry on.. (suspect problems with 64bit runtime libs..?)
2) Dual boot the laptop with Windows XP 32bit.
3) Run some kind of Virtual Machine with Windows XP in it... (I don't have a VM yet, but would look into it)
Thanks

The answer is 1) you just need to make sure that you target processor is 32bit. You can develop for 32bit machine on a 64bit machine and vice versa.
After some looking around it looks like you must have up to date service packs. Read http://msdn.microsoft.com/en-us/vstudio/aa948853.aspx if you want to know more.

Visual Studio includes both 32-bit and 64-bit compilers and tools.
You can install VS on Windows 7 x64 and develop 32-bit applications without any problems.
(Just don't do something insane like hard-coding "C:\\Program File (x86)\\")

As the others have pointed out, both the 64 bit and 32 bit versions of VS can target both 64 bit and 32 bit runtime environments. Further you can use either the 64 or 32 bit versions of Windows 7 (obviously the 64 bit version of VS requires 64 bit Windows, but VS 32 bit runs on either).
But you have a second part to your question, debug/test on 32 bit. Depending on the kinds of applications you build, testing under Windows 7 64 bit alone may not be sufficient. You may want to test in a Windows XP virtual machine running under Windows 7, or in certain cases you may need a real 32 bit computer to test on.

Related

Can I run 64 bit dlls on a 32 bit machine?

I have recently converted My visual studio solution to 64 bit from 32 bit. But, I have 1 machine which is running Windows Server 2003 (32 bit).Can I deploy and run these newly built 64 bit dlls on this 32 bit machine?
Basically, the answer is no.
If the underlying hardware is 32-bit, then it definitely won't support 64-bit instructions.
If the hardware is 64-bit (and the OS is just 32-bit), it's possible in theory, but would require the kernel to not only setup a 64-bit code segment, but to also setup 64-bit paging (I think). Since I doubt the 32-bit Windows kernel supports either of these, then it's not possible.
Yes you can using third party software like
http://www.vmware.com/products/
BUT don't expect much from the performance!

Visual Studio - Compile for 32 bit vista on 64 bit windows 7

I am having a little trouble with a small Winform program I have created that uses Sqlite.
I have developed the program on a Windows 7 64 bit machine and compiled it using the Any CPU compile option.
Program uses .NET framework version 4, Vista PC has framework version 4 on it.
The output runs fine on my 64 bit Win 7 PC but on a 32 bit Vista machine it does not run.
I also tried Mixed platforms. Am I missing anything else in my compilation options to ensure this will run on a 32 bit platform?
Regards and thanks
John

Including sql server compact in desktop install for win 7 32bit and 64bit

I have a desktop app created in vs10 and am using clickonce install. I must include a database with critical info for the program as part of the install. I am compiling for all versions of windows (32 and 64). But as I understand it, if I include the 32 bit sqlce as part of the installation, it will not work on 64 bit installs. Must I include a 32 bit and 64 bit version of the db and test for windows version before accessing the data? Or is there a simpler solution that I am missing?
You can just include all the required files as content with your app, and it will run for any user and on both x86 and x64 platforms. Just follow the instructions here: http://erikej.blogspot.com/2011/02/using-sql-server-compact-40-with.html

How to create an installer condition that test for 32 and 64 bit Windows

I am creating a visual studio set-up project. I need to test to see if the version of Windows I am being installed on is 64 or 32 bit. I am planning on checking for the existence of the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node as a way of telling that I am being installed on 64 bit windows. Is this a good idea and/or is there a better way?
The reason that I want to know which version of Windows I am on is so I can create a directory under either System32 or SysWOW64. I would rather not create two installers one targeting 64 bit platforms and one targeting 32 bit platforms.
The easiest way to check for a 64 bit machine in an MSI installer is to use the VersionNT64 property. This will only be set if the target machine is running a 64 bit operating system.
http://msdn.microsoft.com/en-us/library/aa372497(VS.85).aspx

Can I still develop 32-bit applications using a 64-bit machine?

I'm wondering if I can still develop 32-bit apps using a 64-bit machine (64-bit Windows Vista with Visual Studio 2008 SP1)? Because I am planning to buy a laptop with 64-bit Vista. Im asking just to make sure. Thanks!
64-bit Windows runs 32-bit Visual Studio just fine. Unless you specify you wish you use the x64 development tools, it will still compile 32-bit applications.
Straight from the page:
Visual Studio uses the 32-bit cross
compiler even on a Windows 64-bit
computer. You can, however, use devenv
commands to create a command line
environment to call 64-bit hosted
tools.
Further Information: http://msdn.microsoft.com/en-us/library/ms246588(VS.80).aspx
With Visual Studio you are able to target what platform. By default it will run on "Any CPU" (read 32 or 64 bit), but you can specify if you desire. Look under Project>Properties>Build and look for the "Platform Target" property.
Yes. 64-bit vista will run 32-bit executables, so if you have a 32-bit compiler, it will still work.
Within visual studio you can tell it what to compile to under the Configuration Manager - (Build Menu - Configuration manager) - this allows you to target 32 or 64 bit.
64bit of consumer hardwares is usually "amd64" architecture which can run both 32bit apps and 64bit ones natively. Windows Vista 64bit edition supports both 32bit and 64bit system libraries, so basically you can run both type of applications as well. (Note that IA-64 architecture does not allow this.)
Compiling a program in 64bit is not much related to the platform that the compiler runs. But, of course, to run and test the result binary requires the corresponding architecture.
As many mentioned above, VS2008 let you choose the target architecture, so there's no problem.
I've found that just the setup.exe created by Visual Studio 2012 Express won't work on XP, but if you go ahead load MS 4.0 .NET Framework from the Microsoft Website then the *.application will load and install without using the setup.exe at all.

Resources