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,560 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 74

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 74

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This video discusses moving either the default database or any database to a new volume.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

744 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

10 Experts available now in Live!

Get 1:1 Help Now