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.
source share