Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2014-04-03
5
Medium Priority
?
4,113 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 800 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 1200 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 1200 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

618 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