Outlook 2010加载项未通过WiX正确安装
本文关键字:WiX 安装 2010 加载项 Outlook | 更新日期: 2023-09-27 17:59:50
我第一次尝试WiX 3.8,试图为一个简单的Outlook 2010加载项创建一个设置。除其他外,外接程序还需要在"编写"上创建一个功能区选项卡。我想我的Product.wxs中遗漏了一些东西。当我从VS 2013 IDE执行加载项时,它在Outlook中正确显示,但当从WiX安装时,功能区不会在Compose模式下显示,而是只在Outlook Explorer中显示。我想我在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>
进一步的调查显示,实际上在功能区加载Outlook是给出例外:
**调用函数"GetVisible"时出现异常
配置系统初始化**失败
这似乎是在尝试检索我的一个应用程序设置时发生的:
<?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>
奇怪的是,当在Outlook中通过IDE进行调试时,它会完美地加载。但从Wix安装后,当我启动outlook时,会出现这个异常。
如果加载项出现在Outlook中,安装程序可能很好——如果缺少文件或注册表值,我希望加载项根本不会显示。我建议在Outlook的高级设置中选中"显示加载项用户界面错误"框,这可能会提醒您功能区问题。。。大概