You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

VS2017制作VSTO Outlook插件MSI安装后无法激活,报URI格式错误

问题描述
  • 按照官方文档制作MSI安装包,安装过程顺利且注册表项正常生成,但32位Outlook 2016中插件未激活,甚至未出现在禁用COM插件列表中。
  • 环境:Visual Studio 2017、32位Outlook 2016
  • 日志报错信息:
************** Exception Text **************

System.UriFormatException: Invalid URI: The URI scheme is not valid.
   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
   at System.Uri..ctor(String uriString)
   at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.CreateCustomizationDomainInternal(String solutionLocation, String manifestName, String documentName, Boolean showUIDuringDeployment, IntPtr hostServiceProvider, Boolean useFastPath, IntPtr& executor)
   at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.Microsoft.VisualStudio.Tools.Office.Runtime.Interop.IDomainCreator.CreateCustomizationDomain(String solutionLocation, String manifestName, String documentName, Boolean showUIDuringDeployment, IntPtr hostServiceProvider, IntPtr& executor)
  • 疑问:该问题是否由缺少必要组件导致?
解决方案分析

这个错误不是缺少必要组件引发的,核心原因是VSTO运行时在解析插件的部署路径或清单文件路径时,遇到了格式无效的URI。重点排查以下内容:

  • 检查注册表中插件对应的Manifest键值:本地路径必须使用合法格式,比如添加file:///前缀(示例:file:///C:\Program Files\YourAddIn\YourAddIn.vsto),或者使用转义后的绝对路径(反斜杠需写成\\,或替换为正斜杠);若为网络路径,需确保URI符合标准格式。
  • 验证MSI安装的清单路径正确性:确认.vsto文件已正确复制到安装目录,且注册表中指向的路径与实际文件位置完全匹配。
  • 确认VSTO运行时版本:虽然堆栈显示运行时已在执行,但仍需确保安装了与Visual Studio 2017兼容的VSTO 2017 Runtime(避免版本不匹配的隐性问题)。
  • 检查权限设置:确保Outlook进程拥有读取插件安装目录和对应注册表项的权限,防止因权限不足导致路径解析异常。

内容的提问来源于stack exchange,提问作者Y.T

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.12 14:15:26