5

I have an installer that uses 3rd party dependency DLL files. Those DLLs comes as 32-bit and 64-bit.

Is it possible to create a project that takes the 32-bit version when compiled for x86 and the 64-bit version when compiled for x64?

For now I have 2 MSI projects: one for 32-bit and another for 64-bit ... and I don't like this solution.

Piotr Dobrogost
  • 41,292
  • 40
  • 236
  • 366
eddyuk
  • 4,110
  • 5
  • 37
  • 65

2 Answers2

2

If I understood your question correctly, yes - it is possible. You just need two platform configurations for your project, one for the 32bit and one for 64bit build. To do so, go to the configuration manager (right click on the solution -> configuration manager). Then click on the "active solution platform" pulldown -> new -> x64. When prompted, select "use settings from 32bit configuration".

Now you can switch between these two configs. You can point to different libraries (32bit or 64bit) for the separate builds and your settings remain saved.

Violin Yanev
  • 1,507
  • 2
  • 16
  • 23
  • you misunderstood the problem.. Sorry for commenting but i just want to comment here so that people would know that this post is not about "How to create one solution where we can compile 32-bit and 64-bit installer" – Jack Frost Jul 31 '13 at 02:10
1

Visual Studio setup projects do not support dynamic file sources. So you cannot use a single project for both 32-bit and 64-bit.

Other setup authoring tools offer more control over this in a single project.

Cosmin
  • 21,216
  • 5
  • 45
  • 60