- .NET assembly: Any CPU
- 32-bit COM component
Ensure a .NET Application or Website works in both 32 bit and 64 bit Environments
With 64 bit versions of Windows fast becoming the standard it is imperative that an app work in both 32 bit and 64 bit environments. This done using a basic configuration setting, with a few caveats of course. In Visual Studio in the project’s build options you can select the app’s Platform target, which can be x86, x64, Itanium, or Any CPU (the listing you see may vary, depending on what you have installed with Visual Studio). Unless there is a good reason not to, you should always select Any CPU see below: Since .NET assemblies consist of byte code that is JIT (just-in-time) compiled to the current platform at runtime, an app’s assemblies will function on any architecture without needing to rebuild from the source code. However, the choice is not always that simple. If your .NET assembly references or interops with another managed assembly or an unmanaged DLL which was compiled for a certain architecture, then your app’s .NET assembly will need to match the assembly or dll’s. Take for example a scenario where you have the following: