?
Solved

How can I tell if an app is 32 or 64 bit?

Posted on 2014-12-16
7
Medium Priority
?
178 Views
Last Modified: 2014-12-17
using Visual Studio, How can I tell if an app is 32 or 64 bit?
0
Comment
Question by:HLRosenberger
[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
  • 3
  • 2
  • 2
7 Comments
 
LVL 36

Expert Comment

by:Miguel Oz
ID: 40503540
IF you're using .NET 4.0 or greater, use the new Is64BitProcess Property:

Environment.Is64BitProcess

Open in new window

0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 40503545
Let me clarify - Isn't an executable built for either 32 or 64 bit?   Then I would assume that a 32-bit exe can run in 64 bit space, but not vice versa, of course.
0
 
LVL 36

Expert Comment

by:Miguel Oz
ID: 40503560
You can build (platform) as any CPU, and .NET run time will pick up how to run your app based on the OS.
I think you are after the compile platform info. Go to project properties, compile tab and on the top you will find platform combo box.
From memory I do not think you can build vb.net apps for x86 or x64, only any CPU is the option available.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 34

Accepted Solution

by:
it_saige earned 2000 total points
ID: 40503691
Not true Miguel.  You can compile any project of any language to any specifications you, as the developer, require.

As to the answer to your question.  As a rule a VS project can be built for a specific platform or all platforms.Capture.JPGChoosing the platform tells the compiler where to put the assemblies based on the Build output path.
You can choose your Advanced Compile Options to determine the CPU type to build for; x86, x64, Itanium or AnyCPU.Capture.JPGAnd you can add/edit the configuration by using the configuration manager.Capture.JPGCapture.JPG
By definition a project built for a specific platform can only run on a platform that:
A. Explicitly meets the requirements to run the project output.
B. Contains an emulator that can replicate the requirements to run the project output.

This is essentially how Windows x64 OS's can run 32-bit applications.  However, you are right, a 32-bit application can run in a 64-bit environment, but a 64-bit application cannot run in a 32-bit environment.

-saige-
0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 40504599
Thanks!  that's what I was looking for.
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 40504610
Followup question - If under Platform I only have the Active x86 option, what does that mean?
0
 
LVL 34

Expert Comment

by:it_saige
ID: 40504701
That just means that you do not have a configuration built for x64, Itanium or Any CPU...  Which is why I posted that you can add/edit the configurations...

-saige-
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

719 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