Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8482941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T19:57:00+00:00 2026-06-10T19:57:00+00:00

It is unclear to me how the compiler will automatically know to compile for

  • 0

Enter image description here

It is unclear to me how the compiler will automatically know to compile for 64-bit when it needs to. How does it know when it can confidently target 32-bit?

I am mainly curious about how the compiler knows which architecture to target when compiling. Does it analyze the code and make a decision based on what it finds?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T19:57:02+00:00Added an answer on June 10, 2026 at 7:57 pm

    Microsoft has a blog entry What AnyCPU Really Means As Of .NET 4.5 and Visual Studio 11:

    In .NET 4.5 and Visual Studio 11 the cheese has been moved. The
    default for most .NET projects is again AnyCPU, but there is more than
    one meaning to AnyCPU now. There is an additional sub-type of AnyCPU,
    “Any CPU 32-bit preferred”, which is the new default (overall, there
    are now five options for the /platform C# compiler switch: x86,
    Itanium, x64, anycpu, and anycpu32bitpreferred). When using the “Prefer 32-Bit”
    flavor of AnyCPU, the semantics are as follows:

    • If the process runs on a 32-bit Windows system, it runs as a 32-bit process. IL is compiled to x86 machine code.
    • If the process runs on a 64-bit Windows system, it runs as a 32-bit process. IL is compiled to x86 machine code.
    • If the process runs on an ARM Windows system, it runs as a 32-bit process. IL is compiled to ARM machine code.

    The difference, then, between “Any CPU 32-bit preferred” and “x86” is
    only this: a .NET application compiled to x86 will fail to run on an
    ARM Windows system, but an “Any CPU 32-bit preferred” application will
    run successfully.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My question is maybe a bit unclear so i will give an example <table
Since the question is a bit vague and unclear, I will clarify what I
I am still unclear about which adapter to use in a situation that doesn't
Sorry for the unclear title, an example will clear things up: TABLE: Scenario_victories ID
I am a unclear about file system implementation. Specifically (Operating Systems - Tannenbaum (Edition
Sorry for an unclear question previously; hopefully I can start again... I have this
I am unclear about the following. First, this code compiles fine: #include <vector> typedef
Sorry for unclear title, but I don't know how to state it properly (feel
Ok, it's not about compiling exactly, but recently I discovered the :compiler command in
I'm building a toy database in C# to learn more about compiler, optimizer, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.