Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In simple cases, moving C# code from 32-bit to 64-bit is just a matter of changing the build settings. Safe C# code executes on 64-bit architectures the same way as it does on 32-bit.</p> <p>In practice, you can run into several issues. Here are some to look out for:</p> <ul> <li><p><strong>Does your C# code contain unsafe code?</strong></p> <p>Unsafe code can manipulate pointers, and so it may be written in a way that assumes 32-bit pointers. To find out whether your projects contain unsafe code, you can search your codebase for the "unsafe" keyword.</p></li> <li><p><strong>Are you using P/Invoke?</strong></p> <p>If you are using P/Invoke to call into native code, the CLR runtime will now be looking for a 64-bit DLL rather than a 32-bit one. If a 64-bit DLL is not found at runtime, you'll get an exception ("BadImageFormatException" or something like that)</p> <p>You can search your codebase for "DllImport" to see whether you are using P/Invoke.</p></li> <li><p><strong>Do your projects contain brittle code?</strong></p> <p>After you move your projects to 64-bit, you'll be using a different version of the Just-in-Time (JIT) compiler. The X64 JIT compiler performs some more aggressive optimizations compared to the X86 JIT. As a result, some incorrectly written (typically multi-threaded) code that happened to work in X86 may end up breaking on X64.</p></li> <li><p><strong>Are you using certain features like marshaling, serialization and COM interop?</strong></p> <p>Usages of all these features may need to be modified in the 64-bit build. Some of the keywords to search in your code include "Marshal", "StructLayout", "FieldOffset", "BinaryFormatter" and "Com".</p></li> </ul> <p>Also check out this white paper that further discusses migrating 32-bit managed code to 64-bit: <a href="http://msdn.microsoft.com/en-us/library/ms973190.aspx">http://msdn.microsoft.com/en-us/library/ms973190.aspx</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload