简体   繁体   中英

If “Any CPU” is selected in Visual Studio, do I still need to separate 32-bit and 64-bit assembly in Advanced Installer?

I'm creating mixed 32-bit/64-bit installers using advance installer, according to this guide Advance Installer Guide for 32-bit/64-bit installers I should seperate 32-bit and 64-bit assemblies. My question is what if my visual studio build is set to "Any CPU", can I use single assembly file for both 32-bit and 64-bit or do I have to create seperate 32-bit and 64-bit assemblies and put them in 32-bit and 64-bit folders in advanced installer. 在此处输入图片说明

在此处输入图片说明

Additional Information:

  • My application does not use any DLL references.

If the assembly uses unmanaged 32- or 64-bit code, you have to compile two respective versions. Otherwise, with "Any CPU" you can use the same assembly for both platforms.

Your project shouldn't go under either of them and should instead likely be put under MainFeature .

The important thing is under Install Parameters you have set the Package Type to "Mixed 32/64-bit matching the platform"

You can leave your project building as AnyCPU, and deploy the same assembly to x86 or x64. Advanced Installer's wizard for creating a Mixed Package will ask for files that are x64 only, x86 only, and shared files. Your AnyCPU assembly would be a shared file to deploy for both x86 and x64. Advanced installer puts the shared files in a common component, and the others in their respective 64-bit and 32-bit components.

The Mixed Package uses bootstrapper that contains both an x86 and x64 msi. Another option for deploying your AnyCPU assembly is to create an x86 msi as it would run on both platforms. The x86 msi would deploy your AnyCPU assembly to Program Files (x86), but when run on an x64 machine it would run as an x64 process. 共享文件

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM