Why do .NET developers offer 32-bit/64-bit versions of .NET assemblies?

Posted by Tyler on Stack Overflow See other posts from Stack Overflow or by Tyler
Published on 2009-01-17T23:36:59Z Indexed on 2010/06/14 18:02 UTC
Read the original article Hit count: 231

Filed under:
|
|

Evey now and then I see both x86 and x64 versions of a .NET assembly. Consider the following web part for SharePoint. Why wouldn't the developer just offer a single version and have let the JIT compiler sort out the rest? When I see these kinds offering is it just that the developer decided to create a native image using a tool like ngen in order to avoid a JIT?

Someone please help me out here, I feel like I'm missing something of note.

Updated

From what I got below, both x86 and x64 builds are offered because one or more of the following reasons:

  1. The developer wanted to avoid JITing and created a native image of his code, targeting a given architecture using a tool like ngen.exe.

  2. The assembly contains platform specific COM calls and so it makes no point to build it as AnyCPU. In these cases builds that target different platforms may contain different code.

  3. The assembly may contain Win32 calls using pinvoke which won't get remapped by a JIT and so the build should target the platform it is bound to.

© Stack Overflow or respective owner

Related posts about 64bit

Related posts about release