1

I have started to use WIX to deploy a WPF application. I have created the .wxs file with the desired interface features etc...

My questions is how to distribute the required .Net files that support my WPF executable? Not the .net framework or sql server express, but the dependencies needed to run my executable.

Should the process include building a msi with VS Installer, then including that msi into my WIX script and running that inside of my WIX msi?

Or, what is the correct process for distributing a WPF executable with WIX?

Jerry
  • 6,357
  • 8
  • 35
  • 50
  • 1
    Odd question... You distribute all files the same way you distribute your .exe file. So if the wix installer installs the exe, all you need to do is crack the .wxs and do for your missing files what it does for your executable. –  Mar 13 '12 at 21:15

3 Answers3

4

I don't think your question pertains to WiX or WPF at all. What you need to ensure is that you package up the necessary dependencies along with your installer, whatever they may be. Referencing your dependency files in your installer script should be sufficient.

Bernard
  • 7,908
  • 2
  • 36
  • 33
  • If i may ask, by dependency files do you mean the external dll files, or the other projects in the solution that my project is dependent on? and if i am using some native dlls in my project and they exist in my debug folder will the installer automatically include them or do i have to do something about that? – Abdullah Malikyar Jun 15 '15 at 06:04
  • @FaisalMalikyar: I meant any assemblies (DLL files) that the WPF application depends on to execute. They should be referenced in the installer script so that they are included with the installer so they are installed as part of the application. – Bernard Jun 16 '15 at 00:15
1

Here's the process that I follow for any application.

1) Start with a clean VM that represents the least common denominator of a machine I want to target. Let's say WinXP SP2 32bit.

2) Deploy my application by hand and record all of the steps in a word document. Then try those steps on other OS's to make sure you didn't miss anything.

3) Take each of the steps in my document and implement them in WxS. Keep in mind that Windows Installer and Windows Installer XML is a declarative programming language not an imperative programming language. You don't tell it to xcopy files from dir a to dir b, you describe the directory structure and the installer takes care of it.

BTW, of the things you mentioned, your asking for help with what I consider the simple stuff and excluding the harder more complicated stuff.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
0

As an alternative way, you might see also this post Embedding dlls in a compiled executable to embed all the dll needed (like the interop ones for example) using Costura.Fody. Using WIX there is no more need to add any dependent dll as components in the .wsx file.

Community
  • 1
  • 1
Eli
  • 414
  • 5
  • 10