There's no difference for 1. and 2. Unless you specifically request your binary to be built against particular platform, the .Net tools compile to IL, which is JIT-ed to the actual platform at runtime. Even if you are ngen-ing the application at setup, for the majority of the cases it will not affect your development process.
However, there are couple of caveats when developing on 32-bit machine and targeting 64-bit around use of P/Invoke, COM interop or registry access. By default the app will be JIT-ed as a native app for the target system, thus:
- P/Invoke to a 32-bit dll will fail to load the dll on the 64-bit target system, while happily working on your 32-bit dev machine.
- COM interop will fail with class not registered for 32-bit inproc objects on the target 64-bit machine. 32-bit out-of-proc object might work, depending on how they are registered on the 64-bit machine. Again, everything will work just fine on your 32-bit dev machine.
- Registry access to registry keys for a 32-bit application will work on your dev machine, but will write to a different place on the 64-bit target system.
You can solve any of these by forcing your application to be 32-bit, though this works for scenario 2 from your list.
As far as drivers go - I am not sure if you can really use .Net to write Windows Driver, at least I haven't had much experience in this area (last WIndows driver I wrote was back in 1993 for Windows 3.11 :-)). But if you could:
- same issues as above apply
- when accessing directly memory be aware of the different addressing between 32-bit and 64-bit (always use 64-bit pointers)
- follow the best practices from the Windows Driver Kit documentation