![](/img/trans.png)
[英]Package Manager > The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
[英]VSTO Error System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)
當我嘗試在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標志,IntPtr hToken,Guid和riid)
在System.Deployment.Internal.Isolation.IsolationInterop.GetUserStore()
在System.Deployment.Application.ComponentStore..ctor(ComponentStoreType storeType,SubscriptionStore subStore)
在System.Deployment.Application.SubscriptionStore..ctor處(字符串deployPath,字符串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,布爾值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(TimeSpan超時)
在Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()
您缺少部署中的一個或多個文件。 很可能您已在其他計算機上的GAC中安裝了某些軟件,但是當前的計算機沒有安裝組件或引用的程序集。
您可以嘗試打開增強型日志記錄並檢查結果。 它可能會准確指出丟失了什么文件。 您可以在ClickOnce部署中的“ 增強日志記錄”文章中閱讀有關此內容的更多信息。 我也發現了一個類似的論壇線程-GetUserStore拋出FileNotFoundException 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.