I want to make existing .NET applications (WinForms and WebForms) run on 64-开发者_如何转开发bit machines, optimized to take advantage of more memory available on 64-bit machines. What do I need to do to the applications to take advantage of the memory? Do I just select the target CPU as 64-bit? What is the advantage of selecting the target versus just compiling the app for All CPUs and have the .NET optimize the app locally?
Will Crystal Reports (in VS 2008) run optimized for 64-bit and take advantage of the upper memory?
You can set the target CPU to "AnyCPU". This will JIT to x86 code on x86 machines and x64 code on x64 machines. Keep in mind that any unmanaged DLL's you reference will very likely cause problems. I have no idea if Crystal Reports takes any dependencies on unmanaged DLL's (it used to be a thin wrapper over ActiveX crap, not sure about now.)
If your application only references managed code that is compiled for AnyCPU you should be fine.
There is no real "advantage" to specifying the CPU architecture up front. It's a way to deal with the fact that you may need to ensure that the application only JIT's to one particular architecture. For example, if you use the Microsoft Jet OLEDB provider and your application is compiled for AnyCPU, on a x64 OS it will fail at runtime because it will run as a x64 process and there is no x64 OLEDB driver for Jet.
In this case, you could force it to target x86 then even on an x64 OS, the application would still JIT to x86.
Unless you need conditional compilation to be able to swap out third part components that require native support on different architectures, I would generally recommend leaving it up to the runtime (Any CPU).
The framework on the target machine will take care of it and it makes your life easier rather than having to manage build configuration for various environments.
There are 2 flavors of CR runtime:
- Crystal Reports (full version runtime)
- Crystal Reports Basic (bundles with VS 2005, 2008)
Your 64-bit support will depend on which version you choose for your application.
There are no 64-bit dlls for Crystal Reports XI Release 2 or Crystal Reports 2008. Only the .NET 2005 (CR 10.2) and .NET 2008 (CR 10.5) bundles (CR Basic) are 64-bit. If you need to use the complete Crystal Reports runtime for CR XI or CR 2008 you have to compile your app in 32-bit mode (x86).
SAP link 1
SAP link 2
精彩评论