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: 294
        
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:
- The developer wanted to avoid JITing and created a native image of his code, targeting a given architecture using a tool like ngen.exe. 
- 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. 
- 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