Reputation: 181
Is the ASP.NET/C# code I develop inherently 32/64 bit agnostic, because it's compiled to some sort of intermediate language? The reason I ask is that I compile my ASP.NET app on an x64 laptop and then deploy on an x32 server. There are no problems. Further, I see no options for selecting between a 32 and 64 bit build in VS2010.
Upvotes: 4
Views: 273
Reputation: 19365
There are some 3rd party libraries that can only run as x86.
The best approach would be to have your local environment (local IIS) to match the settings of your target webserver as much as possible. So if your target IIS only runs as 32 bit, set the "force 32 bit" property of the applicationpool on your local IIS to true.
Upvotes: 0
Reputation: 39695
You can compile your code to
If you compile for AnyCPU you are in good shape, and more often than not, you will use the AnyCPU platform target. (Build -> Configuration Manager in Visual Studio)
When compiling .Net code it's compiled into Intermediate Language code (MSIL) which in turn is compiled to native code at runtime by the .Net framework/runtime.
Upvotes: 4