visual studio 2008 - How can I make my VS2008 x86 installer install x64 assemblies on x64? -


i'm using vs2008 installer (plus custom orca action) create installer .net product.

i found out 1 of third-party assemblies using x86-specific (as includes native code); thus, x64 customers getting crashes on startup errors assembly not being appropriate platform.

i sent such customer copy of x64 version of third-party assembly, , told him copy on existing x86 one. worked, sweet! need make installer me.

this appears nontrivial :(. ideally, want installer (which x86, since can run on both platforms) include both x86 , x64 versions of third-party assembly, , install appropriate one. in other words, want single installer makes users' lives easy.

i thought had worked out, using msi conditional statements , that. apparently no... vs2008 setup projects won't compile unless specify "x86" or "x64." if specify x86, gives compilation error saying can't include x64 assembly. if specify x64, result cannot executed on x86 computer. damn!

someone must have had problem before. unfortunately google unhelpful, turn stackoverflow!

if understand correctly, want copy of 1 file if you're installing on x86 , different file (with same name) if you're installing on x64 platform.

first of all, cannot create 1 msi 2 different platforms, since x64 msi not run on x86 platform , x86 msi installed using wow64 on x64 platform.

on other hand, can create 1 x86 msi contains 2 different versions of file , selectively copy appropiate file during installation.

the easiest way using wix (v3) instead of build-in vs2008 msi generator. wix gives far greater control on gets installed on customer's machine , where, ability generate different installers different platforms , full msbuild support added bonus. (see http://wix.sourceforge.net more info.)

in case if you're wondering wix still in beta, generated msi files ok , never ran bug yet. (and develop setup projects living.)

finally, can check versionnt64 property if x86 installer running on x64 platform. if property present, you're running x64, otherwise you're running on x86.

hope helps.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -