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,872 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 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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Suggested Solutions

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

734 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