Is there a way in .NET (3.5 or less) to tell if a console application is running on x86 or x64?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Do you mean the machine or the process? Why do you want to know?
Aku’s answer will tell you if the process you are in is running in a 64bit mode. On current versions of Windows this could mean either Itanuim or x64.
Your process won’t necessarily be 64 bit even on a 64 bit machine/OS.
Othewise Microsoft.Build.Utilities.ProcessorArchitecture.CurrentProcessArchitecture returns a string with the current proc arch. It’s in 3.5.