I have already successfully generated and successfully installed my C # WPF application with Wix. The application includes Crystal report dll and some other dll like Zen Barecode. After an nth attempt to modify the main project, the MSI is able to install itself but by launching the application either from the shortcuts or the executable directly, it does not start.
Here is my wix product.wxs
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*"
Name="MyApp 1.0.0"
Language="1036"
Codepage="1252"
Version="1.0.0"
Manufacturer="My Company"
UpgradeCode="PUT-GUID-HERE">
<Package InstallerVersion="200"
Compressed="yes"
InstallScope="perMachine"
Description="Some description"
Keywords="Some keywords"
Comments="(c) some comments"
/>
<MajorUpgrade DowngradeErrorMessage="La dernière version de MyApp est déjà installée" />
<MediaTemplate EmbedCab="yes" />
<Icon Id="icon.ico" SourceFile="$(var.InstallFolderPath)\logo.ico"/>
<Feature Id="ProductFeature" Title="TPI SOFT" Level="1">
<ComponentGroupRef Id="ProductComponents" />
<ComponentGroupRef Id="LibrariesComponents" />
<ComponentGroupRef Id="CustomFonts" />
<ComponentRef Id="CMP_MenuShortcut" />
<ComponentRef Id="CMP_DesktopShortcut" />
</Feature>
<Property Id="ARPPRODUCTICON"
Value="icon.ico" />
<Property Id="ARPCONTACT"
Value="My Contact"/>
<PropertyRef Id="NETFRAMEWORK45"/>
<Condition Message="Ce logiciel requiert l'installation préalable de Microsoft .NET Framework 4.5 ou plus.">
<![CDATA[Installed OR NETFRAMEWORK45]]>
</Condition>
<Condition Message="Ce logiciel tourne sur tous les systèmes Windows à partir de Windows Vista">
<![CDATA[Installed OR VersionNT >= 600]]>
</Condition>
<Property Id="WIXUI_INSTALLDIR" Value="APPLICATIONFOLDER" />
<UIRef Id="WixUI_InstallDir" />
<WixVariable Id="WixUILicenseRtf"
Value="$(var.InstallFolderPath)\licence.rtf" />
<WixVariable Id="WixUIDialogBmp"
Value="$(var.InstallFolderPath)\dialog_bmp.bmp"/>
<WixVariable Id="WixUIBannerBmp"
Value="$(var.InstallFolderPath)\top_banner.bmp"/>
<Property Id="ApplicationFolderName"
Value="MyApp\MyApp" />
<Property Id="WixAppFolder"
Value="WixPerMachineFolder" />
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="COMPANYFOLDER" Name="My Company">
<Directory Id="APPLICATIONFOLDER" Name="My App 1.0.0">
</Directory>
</Directory>
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="MyStartMenuShortcutDir"
Name="My App"/>
</Directory>
<Directory Id="DesktopFolder">
</Directory>
<Directory Id="FontsFolder">
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="APPLICATIONFOLDER">
<Component Id="cmp436C9F728138518252041AF1E09808A9" Guid="PUT-GUID-HERE">
<File Id="filC9EEE3E54616B953432FF36EDA3020A3" KeyPath="yes" Source="$(var.MyApp.TargetDir)MyApp.exe" />
</Component>
<Component Id="cmp840D318334E734AB5C8FA4C807C4CB95" Guid="PUT-GUID-HERE">
<File Id="filE698BF079DEBA8E2BC7F2E69833E372D" KeyPath="yes" Hidden="yes" Source="$(var.MyApp.TargetDir)MyApp.exe.config" />
</Component>
<Component Id="CMP_Licence"
Guid="558784B2-E92A-4686-95BD-A034E859E8A7">
<File Id="licence"
Source="$(var.InstallFolderPath)\licence.rtf"
KeyPath="yes" />
</Component>
</ComponentGroup>
<ComponentGroup Id="CustomFonts" Directory="FontsFolder">
<Component Id="CMP_DigitalFont"
Guid="PUT-GUID-HERE">
<File Id="digitalFont"
Source="$(var.FontFolderPath)\digital-7.ttf"
TrueType="yes"
KeyPath="yes" />
</Component>
</ComponentGroup>
<Component Id="CMP_MenuShortcut"
Directory="MyStartMenuShortcutDir"
Guid="PUT-GUID-HERE">
<Shortcut Id="MenuShortcut"
Name="MyApp 1.0.0"
Description="Lance le logiciel MyApp"
Target="[APPLICATIONFOLDER]MyApp.exe"
WorkingDirectory="APPLICATIONFOLDER"
Icon="icon.ico"/>
<RemoveFolder Id="RemoveMyStartMenuShortcutDir"
On="uninstall" />
<RegistryValue Root="HKCU"
Key="Software\MyApp"
Name="installed"
Type="integer"
Value="2"
KeyPath="yes" />
</Component>
<Component Id="CMP_DesktopShortcut"
Directory="DesktopFolder"
Guid="PUT-GUID-HERE">
<Shortcut Id="DesktopShortcut"
Name="MyApp 1.0.0"
Description="Lance le logiciel MyApp"
Target="[APPLICATIONFOLDER]MyApp.exe"
WorkingDirectory="APPLICATIONFOLDER"
Icon="icon.ico"/>
<RemoveFolder Id="DesktopFolder" On="uninstall"/>
<RegistryValue
Root="HKCU"
Key="Software\MyApp"
Name="installed"
Type="integer"
Value="1"
KeyPath="yes"/>
</Component>
</Fragment>
</Wix>