当我尝试在Visual Studio 2015 Enterprice中调试Excel工作簿(VSTO)时,出现以下错误,
来自:file:/// c:/users/sameera.madhusanka/documents/visual studio 2015 / Projects / ClassLibrary1 / ExcelWorkbook2 / bin / Debug / ExcelWorkbook2.vsto
例外文字:
System.IO.FileNotFoundException:系统找不到指定的文件。 (HRESULT异常:0x80070002)
在System.Deployment.Internal.Isolation.IsolationInterop.GetUserStore(UInt32 Flags,IntPtr hToken,Guid& riid)
在System.Deployment.Internal.Isolation.IsolationInterop.GetUserStore()
在System.Deployment.Application.ComponentStore..ctor(ComponentStoreType storeType,SubscriptionStore subStore)
at System.Deployment.Application.SubscriptionStore..ctor(String deployPath,String tempPath,ComponentStoreType storeType)
在System.Deployment.Application.SubscriptionStore.get_CurrentUser()
在System.Deployment.Application.DeploymentManager..ctor(Uri deploymentSource,Boolean isUpdate,Boolean isConfirmed,DownloadOptions downloadOptions,AsyncOperation optionalAsyncOp)
在System.Deployment.Application.InPlaceHostingManager..ctor(Uri deploymentManifest,Boolean launchInHostProcess)
at Microsoft.VisualStudio.Tools.Applications.Deployment.IPHMProxy..ctor(Uri uri)
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.get_Proxy()
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.GetManifests(TimeSpan timeout)
at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
答案 0 :(得分:0)
您缺少部署中的一个或多个文件。很可能你在其他机器上的GAC中安装了一些东西,但是当前没有安装组件或引用的组件。
您可以尝试启用增强日志记录并查看结果。它可能精确地确定缺少哪个文件。您可以在Enhanced Logging in ClickOnce Deployment文章中详细了解相关信息。我也找到了类似的论坛帖子 - GetUserStore throws FileNotFoundException。