How to use wixlibs as file references with support for different platforms?

601 views Asked by At

I just am trying to replicate my distributed C# project structure to WIX setup projects. Now there is the following problem:

LIB: a C# library solution that builds AnyCPU .NET dlls from several C# projects

APP: the dlls from LIB are referenced (as file references) by this main application solution. Additionally there are platform dependent libs included in this application solution, therefore it is important to being able to create setups for the two specific target platforms x86 and x64.

Now I started to create a wixsetup project within the APP solution (which works fine). Then I proceeded with creating a wixlib within the LIB solution that references the LIB .NET dlls into the wixlib.

Now the problem:

The wixlib references the AnyCPU .NET dlls within a DirectoryRef which seems to be platform specificly tagged when creating the wixlib. Therefore I have to go back to the LIB solution, build the project with one platform target, copy the built files (via SVN externals mechanisms) to the APP solution, build this project with the exact same target platform as the wixlib was created with and repeat this procedure for creating the other platform.

It may seem that this is kind of complicated, but doable. Due to the fact that I omitted several other library solutions for which the same problem applies and the fact that all those libraries are used in multiple application solutions and - finally - everything has to run on our build server automatically as well, it is clear that this will not work.

I know of the following solution, though:

Double the .NET dll references within wixlib to assign them to different DirectoryRef INSTALLDIR and INSTALLDIR32 e. g. and to implement those different directory references in the wixsetup. But this would complicate things as well and is not my preferred solution therefore - if there is an alternative.

If there is no smart alternative, just tell me and I will do things as described in the last paragraph.

0

There are 0 answers