简体   繁体   中英

VSTO Error System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

When I try to debug Excel workbook (VSTO) in Visual studio 2015 Enterprice, I get following error,

在此处输入图片说明

From: file:///c:/users/sameera.madhusanka/documents/visual studio 2015/Projects/ClassLibrary1/ExcelWorkbook2/bin/Debug/ExcelWorkbook2.vsto

The exception text:

System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002)

at System.Deployment.Internal.Isolation.IsolationInterop.GetUserStore(UInt32 Flags, IntPtr hToken, Guid& riid)

at System.Deployment.Internal.Isolation.IsolationInterop.GetUserStore()

at System.Deployment.Application.ComponentStore..ctor(ComponentStoreType storeType, SubscriptionStore subStore)

at System.Deployment.Application.SubscriptionStore..ctor(String deployPath, String tempPath, ComponentStoreType storeType)

at System.Deployment.Application.SubscriptionStore.get_CurrentUser()

at System.Deployment.Application.DeploymentManager..ctor(Uri deploymentSource, Boolean isUpdate, Boolean isConfirmed, DownloadOptions downloadOptions, AsyncOperation optionalAsyncOp)

at 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()

You are missing one or more of the files in your deployment. Most probably you have something installed in the GAC on other machines, but the current one doesn't have a component or referenced assembly installed.

You can try turning on the enhanced logging and checking out the results. It might pinpoint exactly what file is missing. You can read more about this in the Enhanced Logging in ClickOnce Deployment article. Also I've found a similar forum thread - GetUserStore throws FileNotFoundException .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM