VSTO加载项在Outlook COM加载项中不可见

问题描述 投票:0回答:1

我有一个Outlook加载项,在Outlook COM加载项和禁用的项目窗口中不可见。几天前,该外接程序运行良好,可以使用Visual Studio模式进行调试,也可以使用Windows安装程序项目创建的安装程序。

我检查了是否创建了正确的注册表,它是正确的。Registry Entry

而且,调试时在VS控制台上不会引发任何错误。所以,idk此处的实际错误是什么。

我也尝试直接从bin文件夹运行VSTO部署文件,但这给了我一些错误:

名称:来自:file:/// C:/Users/User/source/repos/MyOutlook/MyOutlookAddin/bin/Debug/MyOutlookAddin.vsto

**************例外文字**************System.Deployment.Application.DeploymentDownloadException:下载文件:/// C:/Users/User/source/repos/MyOutlook/MyOutlookAddin/bin/Debug/MyOutlookAddin.vsto失败。 ---> System.Net.WebException:找不到路径'C:\ Users \ User \ source \ repos \ MyOutlook \ MyOutlookAddin \ bin \ Debug \ MyOutlookAddin.vsto'的一部分。 ---> System.Net.WebException:找不到路径'C:\ Users \ User \ source \ repos \ MyOutlook \ MyOutlookAddin \ bin \ Debug \ MyOutlookAddin.vsto'的一部分。 ---> System.IO.DirectoryNotFoundException:找不到路径“ C:\ Users \ User \ source \ repos \ MyOutlook \ MyOutlookAddin \ bin \ Debug \ MyOutlookAddin.vsto”的一部分。在System.IO .__ Error.WinIOError(Int32 errorCode,可能是StringFullPath)在System.IO.FileStream.Init(字符串路径,FileMode模式,FileAccess访问,Int32权限,布尔useRights,FileShare共享,Int32 bufferSize,FileOptions选项,SECURITY_ATTRIBUTES secAttrs,字符串msgPath,布尔bFromProxy,布尔useLongPath,布尔checkHost)在System.IO.FileStream..ctor中(字符串路径,FileMode模式,FileAccess访问,FileShare共享,Int32 bufferSize,FileOptions选项,String msgPath,布尔bFromProxy)在System.Net.FileWebStream..ctor处(FileWebRequest请求,字符串路径,FileMode模式,FileAccess访问,FileShare共享,Int32长度,布尔异步)在System.Net.FileWebResponse..ctor(FileWebRequest请求,Uri uri,FileAccess访问,布尔asyncHint)---内部异常堆栈跟踪的结尾---在System.Net.FileWebResponse..ctor(FileWebRequest请求,Uri uri,FileAccess访问,布尔asyncHint)在System.Net.FileWebRequest.GetResponseCallback(对象状态)---内部异常堆栈跟踪的结尾---在System.Net.FileWebRequest.EndGetResponse(IAsyncResult asyncResult)在System.Net.FileWebRequest.GetResponse()在System.Deployment.Application.SystemNetDownloader.DownloadSingleFile(下一个DownloadQueueItem)---内部异常堆栈跟踪的结尾---在Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.GetManifests(TimeSpan超时)在Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()

谁能告诉我这里的问题是什么以及如何解决?

c# .net visual-studio vsto outlook-addin
1个回答
0
投票

似乎您没有正确创建MSI安装程序,或者只是错过了一些步骤。 Deploy an Office solution by using Windows Installer文章介绍了如何使用Visual Studio为您的Office解决方案创建Windows Installer。因此,请确保您已完成文章中列出的所有操作。

System.Deployment.Application.DeploymentDownloadException:下载文件:/// C:/Users/User/source/repos/MyOutlook/MyOutlookAddin/bin/Debug/MyOutlookAddin.vsto失败。 ---> System.Net.WebException:找不到路径的一部分

该异常表明您使用ClickOnce技术部署了外接程序。您不应该真正结合所有技术并决定使用一种技术-ClickOnce或MSI。否则,您将陷入此类情况。如果您决定继续使用ClickOnce,请参阅Deploy an Office solution by using ClickOnce了解更多信息。

最后,要解决外接程序部署中的问题,请查看Troubleshoot Office solution deployment页面。

© www.soinside.com 2019 - 2024. All rights reserved.