.NET code compiled as Any CPU. Want to run as 32-bit on x64.

K

ktrvnbq02

Hi,

I have some .NET 2.0 code that's been built targeting "Any CPU". On an
x64 box I need to force this to run in x86 mode under WOW64 *without*
recompiling the application . (i.e. as if the code had been compiled
targeting x86.)

Is this possible - if so, how?

(Apologies if this is not the correct group - feel free to direct me
somewhere else)


Many thanks,

Matt
 
K

ktrvnbq02

I have some .NET 2.0 code that's been built targeting "Any CPU". On an
x64 box I need to force this to run in x86 mode under WOW64 *without*
recompiling the application . (i.e. as if the code had been compiled
targeting x86.)

Is this possible - if so, how?

Incidentally I know I could do this by launching the code from a 32-
bit process (e.g. launching from 32-bit command prompt), but if
possible I'd like to force this with something like a manifest or an
alteration to the header etc.


Regards,

Matt
 
K

ktrvnbq02

I have some .NET 2.0 code that's been built targeting "Any CPU". On an
x64 box I need to force this to run in x86 mode under WOW64 *without*
recompiling the application . (i.e. as if the code had been compiled
targeting x86.)

Found a solution using corflags.exe in the SDK to modify the PE
header:

http://blogs.msdn.com/gauravseth/archive/2006/03/07/545104.aspx

e.g. corflags myapp.exe /32BIT+

Which is OK if the assembly is not strong named. I would be interested
to know if the same would be possible via a manifest file.


Regards,

Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top