【发布时间】:2018-06-18 07:57:24
【问题描述】:
当我尝试在 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)
在 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)
在 Microsoft.VisualStudio.Tools.Applications.Deployment.IPHMProxy..ctor(Uri uri)
在 Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.get_Proxy()
在 Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.GetManifests(时间跨度超时)
在 Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
【问题讨论】:
-
不就是你没有标记要复制的文件吗?因此它只存在于您的代码存储库中,而不存在于您的编译版本中?在解决方案资源管理器、属性资源管理器中查看文件属性,然后选择“始终复制”应该可以修复它吗?
-
感谢 Morten,我将它们更改为在本地复制。但它仍然显示错误...