Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compiling for 'AnyCPU' through errors
Message
From
07/04/2011 11:23:15
 
 
To
07/04/2011 10:13:17
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
01506035
Message ID:
01506386
Views:
73
>Ok - If I understand you correctly the term "AnyCPY" is then not realy AnyCPU for the client pc.
>
>Also if I want to deploy to either 32-bit or 64-bit I realy need to build two version for that?
>
>Did I understand that correctly?

Not quite. If you target 'x86' then that will run in 32-bit mode whether on a 32 or 64 bit box.
If you target 'AnyCPU' then it will run as 32-bit on a 32-bit box and 64-bit on a 64-bit box.

I'm guessing that on a 64-bit box the 'x86' version will attempt to locate the 32-bit activeX whilst the 'AnyCPU' version ( thus running as 64-bit) will attempt to locate a 64-bit version of the activeX.....

>
>>>The ActiveX component is 32bit and yes there is a 64bit version
>>>
>>>but didn't you say earlier the app doesn't realy run as 64bit, That the AnyCPU alows it to run on a 64bit machine but in 32bit mode.
>>
>>No. To summarise: When you compile a .NET application it is compiled to IL (Intermediate Language) code which is platform agnostic. If you set the Target platform to x86 the *JIT* compiler will compile to 32 bit machine code and, if running on a 64-bit machine, this will be executed using the emulator. If you set the target platform to 'Any CPU' then the JIT compiler will compile to 64 bit on a 64 bit machine (32 bit on a 32-bit).
>>
>>As I understand it (but I confess to being a bit hazy on this) 64-bit code cannot load 32-bit Windows DLLs (and vice versa) so if you target 'Any CPU' , run on a 64-bit machine and attempt to use a 32-bit ActiveX control you will have problems.
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform