Solved

How to compile a 32-bit vb.net program to run in a 64-bit Windows 7?

Posted on 2014-04-03
5
3,630 Views
Last Modified: 2014-04-04
Hello,

I have Visual Studio 2010 in a 32-bit Windows 7. I need to compile my created vb.net program (.exe) to be able to run in a 64-bit Windows 7 environment.

What should I setup in my VS2010 in order to accomplish that?

Thanks
0
Comment
Question by:miyahira
5 Comments
 
LVL 30

Expert Comment

by:pgm554
ID: 39975749
Do you need to run the app as 64 bit?
Are you writing a device driver?
32 bit app should work fine in WOW64.

Unless you actually need the >4gb address space,not really a need in most instances.

FYI ,M$ still recommends 32 bit office over 64 bit edition even on 64 bit Windows.
0
 
LVL 16

Assisted Solution

by:Easwaran Paramasivam
Easwaran Paramasivam earned 200 total points
ID: 39975809
While compiling the project, set the target platform option a x86 (for 32 bit) or x64 (for 64 bit).  Then it would run fine in the target machine.

For more information please look at: http://visualstudiohacks.com/articles/visual-studio-net-platform-target-explained/
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 300 total points
ID: 39975887
You should only need to explicitly set the project to x86 if your application is dependent on  libraries that were compiled to run as a specific architecture (like Oracle data access libraries). Setting your project to "Any CPU" should work fine, otherwise.
0
 
LVL 1

Author Comment

by:miyahira
ID: 39976785
I have set my VS2010 project to "Any CPU" and even so my program doesn't run on a 64-bit Windows 7. However, it does on a 32-bit Windows 7.

Could be it possible it's because I'm using System.Data.OracleClient for database connection?

Error message in 64-bit Windows 7:

"The version of this file is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need an x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher"

The 64-bit Windows 7 has Framework v2 installed. I attach some picture to show that.

Supposedly, WOW64 should run automatically but will not work on all applications.

In this case, should I install on my 64-bit Windows 7 some "Windows virtual PC"? Any further advice on how to do that would be appreciate.
64-bit-windows-7.png
0
 
LVL 75

Assisted Solution

by:käµfm³d 👽
käµfm³d   👽 earned 300 total points
ID: 39977071
System.Data.OracleClient is the Microsoft-provided Oracle provider. I don't recall ever having issues with that particular library with regard to 32- vs. 64-bit.

Be aware that this provider is actually deprecated, and it could be removed in a future version of .NET.

i.e.  (http://msdn.microsoft.com/en-us/library/system.data.oracleclient(v=vs.110).aspx)

This types in System.Data.OracleClient are deprecated and will be removed in a future version of the .NET Framework.

The preferred way to connect to Oracle is by using Oracle's own providers:  ODAC. With ODAC, you do have to explicitly compile for a specific bitness.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now