views:

358

answers:

3

Hi Everyone,

I have written an application on my x64 machine in Visual Studio 2008. The application will be sent to someone, and I have two questions that I need answers to.

  1. What requirements will they need to have installed. I am assuming the .NET 3.5 redistributable. Are there anything else though? (The application does not call any external dependencies).

  2. This is my really question that I can't find the answer to. I have developed and build the application on my x64 machine using the "Any CPU" option (as versus x64 or x86 specifically). Will this run on a 32 bit machine? (I don't have one to test). Or do I need to build it specifically for x86 in order to run it on a 32 bit machine?

Many thanks, Brett

A: 

you should use the corflags tool

corflags myAssembly.dll

if

PE=PE32 and 32BIT= 0 

it will run in 32 bit as x86 app and in 64 bit as x64 app

If you compile your app with "Any CPU" your PE will be PE32 and your 32BIT will be 0

For your reading pleasure

ram
A: 
  1. If you really don't have any external dependencies, yes, only .Net 3.5 will be required, and the bundle may even not be used, depending on the version of windows your customer is using (Windows 7 has it built-in, for example).
  2. Yes. The solution platform selectlist does exactly what is says. Your application should run on either a x86 or x64 CPU if you selected "Any CPU".
Fernando Figueiredo
All your answers are a big help, thank you!
Brett
A: 

See http://stackoverflow.com/questions/516730/visual-studio-any-cpu-target for some information on the Any Cpu target.

AndyC