What is the relationship between a .NET assembly and "bitness" or properly speaking, CPU architecture? I thought that .NET programs are compiled into CIL (bytecode) and that they might end up running in different architectures, and will be just-in-time compiled automatically. Thus there should be no "bitness" to a .NET assembly.
But the real world doesn't seem to be so simple. I test programs on a 64-bit machine and frequently run into weird compatibility issues between, say, my program and another .NET library. So my questions are:
BTW: this question (Differences between 32 and 64-bit .NET (4) applications) and its top answer take for granted that there is a definite bitness for .NET applications. But I see no way of setting the architecture in Visual Studio.
The question you reference takes this for granted because it is true: .NET applications are built specifically for different CPU architectures (and can also be built for "mixed platforms" in many cases, where it will run 64-bit if available and 32-bit otherwise).
By default this option is not clearly shown in Visual Studio, but the "Solution Platforms" dropdown can be added to the standard toolbar, by default alongside the "Solution configurations" dropdown.
Also, if you select "Configuration manager" from the configuration dropdown, you'll see your current platform, and can edit settings for each assembly in your solution.
In specific answer to your three bullets:
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