1

I am trying WiX 3.8 for the first time, trying to create a setup for a simple Outlook 2010 add-in. The add-in, apart from other things, needs to create a ribbon tab on the Compose. I guess I a missingn something in my Product.wxs. When I execute the add-in from VS 2013 IDE, it shows up correctly in Outlook, but when installed from WiX, the ribbon does not show up in Compose mode but only in the Outlook Explorer. I guess I am missing something in the Product.wxs.

 <?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Product Id="*" Name="dummyAppSetup" Language="1033" Version="1.0.0.0" Manufacturer="Saurabh Kumar" UpgradeCode="46461820-CDEB-48E7-A975-1ABB1C307EE6">
    <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine"/>
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed."/>
<MediaTemplate EmbedCab="yes"/>
<Feature Id="ProductFeature" Title="NoReplyAll" Level="1">
  <ComponentRef Id="CMP_AddIn"/>
  <ComponentRef Id="CMP_DllManifest"/>
  <ComponentRef Id="CMP_zipdll"/>
  <ComponentRef Id="CMP_VstoManifest"/>
  <ComponentRef Id="CMP_ToolsCommon"/>
  <ComponentRef Id="CMP_ToolsOutlook"/>
</Feature>
<UIRef Id="WixUI_Minimal"/>
<PropertyRef Id="NETFRAMEWORK40CLIENT"/>
<Condition Message="This product requires the .NET Framework 4.0 or higher version installed.">
  <![CDATA[Installed OR (NETFRAMEWORK40CLIENT OR NETFRAMEWORK40FULL)]]>
</Condition>
 </Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
  <Directory Id="ProgramFilesFolder">
    <Directory Id="INSTALLFOLDER" Name="dummyApp">
      <Component Id="CMP_AddIn" Guid="*">
        <File Id="FILE_AddIn" Source="$(var.dummyApp.TargetPath)" KeyPath="yes"/>
        <RemoveFile Id="PurgeFILE_AddIn" Name="*.*" On="uninstall"/>
      </Component>
      <Component Id="CMP_DllManifest" Guid="*">
        <File Id="FILE_DllManifest" Source="$(var.dummyApp.TargetPath).manifest" KeyPath="yes"/>
      </Component>
      <Component Id="CMP_VstoManifest" Guid="*">
        <File Id="FILE_VstoManifest" Source="$(var.dummyApp.TargetDir)$(var.dummyApp.TargetName).vsto" KeyPath="yes"/>
        <RegistryKey Root="HKLM" Key="Software\Microsoft\Office\Outlook\Addins\dummyApp">
          <RegistryValue Name="Description" Value="dummyApp Add-In" Type="string" Action="write"/>
          <RegistryValue Name="FriendlyName" Value="dummyApp" Type="string" Action="write"/>
          <RegistryValue Name="LoadBehavior" Value="3" Type="integer" Action="write"/>
          <RegistryValue Name="Manifest" Value="[#FILE_VstoManifest]|vstolocal" Type="string" Action="write"/>
        </RegistryKey>
        <RemoveRegistryKey Root="HKLM" Key="Software\Microsoft\Office\Outlook\Addins\dummyApp" Action="removeOnUninstall"/>
      </Component>
      <Component Id="CMP_ToolsCommon">
        <File Id="FILE_ToolsCommon" Source="$(var.dummyApp.TargetDir)Microsoft.Office.Tools.Common.v4.0.Utilities.dll" KeyPath="yes"/>
      </Component>
      <Component Id="CMP_ToolsOutlook">
        <File Id="FILE_ToolsOutlook" Source="$(var.dummyApp.TargetDir)Microsoft.Office.Tools.Outlook.v4.0.Utilities.dll" KeyPath="yes"/>
      </Component>
    </Directory>
  </Directory>
</Directory>
</Fragment>
</Wix>

Further investigation revealed that actually on Ribbon load Outlook is giving exception:

**Exception while calling function 'GetVisible'

Configuration system failed to Initialize**

This seems to be happening while trying to retrieve one of my app settings:

    <?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
      <section name="dummyApp.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
    </sectionGroup>
  </configSections>
  <userSettings>
    <AutoZip2010.Properties.Settings>
      <setting name="chkEnabled" serializeAs="String">
        <value>True</value>
      </setting>
      <setting name="chkPreview" serializeAs="String">
        <value>False</value>
      </setting>
      <setting name="chkLog" serializeAs="String">
        <value>False</value>
      </setting>
    </AutoZip2010.Properties.Settings>
  </userSettings>
</configuration>

Strange part is that it loads perfectly when debugging via IDE in Outlook. But post install from Wix, this exception comes when i start outlook.

Saurabh Kumar
  • 2,329
  • 6
  • 32
  • 52

1 Answers1

2

If the add-in appears in Outlook at all, the installer's probably fine - if there were missing files or registry values, I would expect the add-in to not show up at all. I suggest checking the "Show add-in user interface errors" box in Advanced Settings in Outlook, which might alert you to ribbon problems... maybe...