none
how to mak program work in 64 bit and also 32 bit RRS feed

Answers

  • how to mak program work in 64 bit and also 32 bit

    The main item to notice in the image Cor posted is the Target CPU
    setting of AnyCPU.

    In the image that Cor posted you will also see a checkbox near the bottom
    which says: Prefer 32-bit

    The effect of that checkbox is this:

    "If the Prefer 32-bit check box is selected, the application runs as a
    32-bit application on both 32-bit and 64-bit versions of Windows.
    Otherwise, the application runs as a 32-bit application on 32-bit
    versions of Windows and as a 64-bit application on 64-bit versions
    of Windows."

    "Running as a 64-bit application doubles the pointer size, and it can
    cause compatibility problems with libraries that are exclusively 32-bit.
    It makes sense to run an application as 64-bit only if it runs
    significantly faster or needs more than 4 GB of memory."

    "This check box is available only if all of the following conditions
    are true:

    On the Compile Page, the Target CPU list is set to Any CPU.

    On the Application Page, the Application type list specifies that the
    project is an application.

    On the Application Page, the Target framework list specifies the .NET
    Framework 4.5."

    Source:

    Compile Page, Project Designer (Visual Basic)
    Visual Studio 2015
    https://msdn.microsoft.com/en-us/library/fs91s003.aspx

    Compile Page, Project Designer (Visual Basic)
    Visual Studio 2017
    https://docs.microsoft.com/en-gb/visualstudio/ide/reference/compile-page-project-designer-visual-basic

    - Wayne

    • Marked as answer by monemas Wednesday, March 28, 2018 2:40 PM
    Sunday, January 28, 2018 6:23 PM

All replies


  • Success Cor

    Sunday, January 28, 2018 10:33 AM
  • how to mak program work in 64 bit and also 32 bit

    Using which version of Visual Studio?

    Are you referring to the Windows version the program will run under?
    i.e. - 64-bit Windows and 32-bit Windows versions

    Bear in mind that a 32-bit Windows program will run under both 32-bit
    and 64-bit versions of Windows. But a 64-bit version of a program
    will only run on a 64-bit version of Windows.

    - Wayne

    Sunday, January 28, 2018 6:00 PM
  • how to mak program work in 64 bit and also 32 bit

    The main item to notice in the image Cor posted is the Target CPU
    setting of AnyCPU.

    In the image that Cor posted you will also see a checkbox near the bottom
    which says: Prefer 32-bit

    The effect of that checkbox is this:

    "If the Prefer 32-bit check box is selected, the application runs as a
    32-bit application on both 32-bit and 64-bit versions of Windows.
    Otherwise, the application runs as a 32-bit application on 32-bit
    versions of Windows and as a 64-bit application on 64-bit versions
    of Windows."

    "Running as a 64-bit application doubles the pointer size, and it can
    cause compatibility problems with libraries that are exclusively 32-bit.
    It makes sense to run an application as 64-bit only if it runs
    significantly faster or needs more than 4 GB of memory."

    "This check box is available only if all of the following conditions
    are true:

    On the Compile Page, the Target CPU list is set to Any CPU.

    On the Application Page, the Application type list specifies that the
    project is an application.

    On the Application Page, the Target framework list specifies the .NET
    Framework 4.5."

    Source:

    Compile Page, Project Designer (Visual Basic)
    Visual Studio 2015
    https://msdn.microsoft.com/en-us/library/fs91s003.aspx

    Compile Page, Project Designer (Visual Basic)
    Visual Studio 2017
    https://docs.microsoft.com/en-gb/visualstudio/ide/reference/compile-page-project-designer-visual-basic

    - Wayne

    • Marked as answer by monemas Wednesday, March 28, 2018 2:40 PM
    Sunday, January 28, 2018 6:23 PM
  • Hi monemas,

    Because of an additional layer of abstraction between the application and the operating system, the .NET runtime can decide how the intermediate language (IL) instructions are just-in-time (JIT) compiled to native code. Depending on the Windows operating system bitness, the CLR compiles the code to be either 32-bit or 64-bit native code. Thus, a .NET application compiled with the default settings will automatically reflect the number of bits in the underlying OS.

    Project---Properties...Compile tab---Target CPU, by default, the option is set to "Any CPU", meaning that the application will be compiled to native code depending on the number of bits in the operating system.

    You can refer to the following info to get more details.

    https://www.codeguru.com/csharp/.net/article.php/c16921/Understanding-NET-application-options-for-32-and-64bit-systems.htm

    Best Regards,

    Cherry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, January 29, 2018 2:51 AM
    Moderator