1

I'm developing an application in C # that has several dependencies, one of which is different in 32 bits or 64 bits.

When I compile the application: here is the result of the compilation

In the x64 and x86 folders, the same dependency is found (SQLite.Interop.dll), but an architecture-specific file (x86: 1223 KB, x64: 1575 KB).

As said in the title, I want to create an installer for this application using Visual Studo Installer.

When I add the program output to "Application folder", all the dependencies come, except the one in the x64 or x86 folder. How can I add this famous dependency according to the architecture of the computer? If I have to create 2 different installers, how can I just add this dependency to each installer?

Thank you in advance !

1 Answers1

1

Bitness: Different Packages are Required for Different Processor Architectures. 64-Bit installers can install both 32-bit and 64-bit components, 32-bit setups can only install 32-bit components. 32-bit setups run on 64-bit systems, but 64-bit packages do not run on 32-bit systems. In other words you need two different installers, one for 32-bit and one for 64-bit.

File Inclusion: I don't use this project type (for reasons that will be clear below), but you should be able to add the file manually via Right Click Project => Add => File... and then compile two separate setups.

Custom Actions: Beware of bitness issues with custom actions when targeting different platforms. I usually build custom actions using 32-bit code.


Deployment Tools: There are some well-known limitations for Visual Studio Installer projects. Maybe have a quick look at other, common tools (terse summary of different deployment tools capabilities).

Single Source: Advanced Installer does something fancy to allow targeting both architectures with one source. I am not quite sure what they do to be honest. Installshield has similar constructs. WiX can use compiler variables / preprocessor constructs (bottom) to achieve the same.


Links:

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164