Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compiling for 'AnyCPU' through errors
Message
From
07/04/2011 14:27:14
 
 
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
01506035
Message ID:
01506421
Views:
66
So, now that I got the exception handler working things become clear.

The error I get now, when running the app in "AnyCPU" mode on the WinXP 64-bit, is clearly showing that that ActiveX needs to be 64-bit (as you pointed out).

Since this works on all required platforms as a 32-bit version, I am going to leave it.

Now, I still don't know if it works now (in 32-bit) because i took the linq-related code out or something else. Because origionaly my 32-bit compiled app did not run on that machine.

But it works now, and I already spend more time then I wanted on it - so it stays as is - end of discussion! :-)

Thank you very much for your help - I have learned a lot, which I am very thankfull for.




>>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
Reply
Map
View

Click here to load this message in the networking platform