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.
Simply put, a 64-bit processor is more capable than a 32-bit processor because it can handle more data at once. A 64-bit processor can store more computational values, including memory addresses, which means it can access over 4 billion times the physical memory of a 32-bit processor.
NET Framework 1.0 or 1.1 are treated as 32-bit applications on a 64-bit operating system and are always executed under WOW64 and the 32-bit common language runtime (CLR). 32-bit applications that are built on the . NET Framework 4 or later versions also run under WOW64 on 64-bit systems.
As its name suggests, the 32 bit OS can store and handle lesser data than the 64 bit OS. More specifically, it addresses a maximum of 4,294,967,296 bytes (4 GB) of RAM. The 64 bit OS, on the other hand, can handle more data than the 32 bit OS.
Do I Need 64-Bit Windows? For most people, 64-bit Windows is today's standard and you should use it to take advantage of security features, better performance, and increased RAM capability. The only rare reasons you'd want to stick with 32-bit Windows are: Your computer has a 32-bit processor.
If they are using specific non-.Net API, then there may be two code bases for this, a perfect example is COM controls.
ngen is also another very good reason for this as you mentioned.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With