Availability of 32-bit .NET on a 64-bit OS

TL; DR: Do you always have 32-bit components when installing .NET on a 64-bit OS?

I had my application ( IronScheme ) compiled completely as AnyCPU . Although this works great for all platforms, the 64-bit JIT compiler just seems too slow to my liking (about 550% slower to start up and about 25% slower overall). Launching a launch can be decided by NGEN at my meetings and actually improve the launch time by another strange 500% when this is done. This gives an approximately 2,600% improvement in startup time (3,700 ms versus 140 ms) at the 64-bit level. When both 32-bit and 64-bit are NGEN'd, the startup time is the same, but the 32-bit function still works better at runtime.

Now that in most cases 64-bit is not needed at all, I think that x86 targeting in the executable will be the best solution (all other assemblies are aimed at AnyCPU , but from what I see, the executable determines where it goes). Therefore, the idea is to have 2 executable files to run, one targeting on x86, another on x64 (or amd64, since MS calls it).

When installing on a 32-bit OS, I can be sure that there are no 64-bit components. But what about the opposite case? Has the .NET installer installed both 32-bit and 64-bit components? This is important because NGEN cannot build non-AnyCPUs if the target does not match the runtime.

Example:

"IronScheme.Console.exe compilation error: this version is not compatible with the version of Windows you are running on.

Also note that my application is built by default for .NET 2 and VS2008, so the new AnyCPU (32-bit preferred) parameter AnyCPU (32-bit preferred) (in VS2012 / .NET 4.5) is not an option for me at the moment.

PS: Sorry if this was asked before. I don’t know how to look for this particular problem, and my Google fu didn't let me down either.

+6
source share
1 answer

- 32-bit components always present on a 64-bit OS?

No. But the case when it is not installed is somewhat rare. Windows Server Core 2008 R2 (and presumably Core 2012) supports WOW64 as a standalone, installable, and removable component, including the .NET bit. Take a look here for more information.

To install the WOW64 components for Server Core 2008 R2, you must run this:

Start / w ocsetup NetFx3-ServerCore-WOW64

Server Core is the only time I have managed to find where x64 components can be available, but cannot be x86. If you don’t target or do not support Server Core, I’m sure you can safely assume that the x86 bit will be next to the x64 bits.

+5
source

Source: https://habr.com/ru/post/922129/


All Articles