Word add-in - Cannot find the file specified 0x80070002 RRS feed

  • Question

  • I've developed a vsto solution for Word with (vs2010, .Net 4.0.) I've already installed it in various end user computers using ClickOnce installation. Everything works fine until something breaks and i got a "file not found" error while opening Word.
    The .vsto file and all installation files were in the right place, nothing was removed or modified. The same error was reported trying to launch directly the .vsto file.

     This is the full message:

    Eccezione: Impossibile trovare il file specificato. (Eccezione da HRESULT: 0x80070002)
    (exception: cannot find the file specified)

    ************** Testo dell'eccezione **************
    System.IO.FileNotFoundException: Impossibile trovare il file specificato. (Eccezione da HRESULT: 0x80070002)
       in System.Deployment.Internal.Isolation.IsolationInterop.GetUserStore(UInt32 Flags, IntPtr hToken, Guid& riid)
       in System.Deployment.Internal.Isolation.IsolationInterop.GetUserStore()
       in System.Deployment.Application.ComponentStore..ctor(ComponentStoreType storeType, SubscriptionStore subStore)
       in System.Deployment.Application.SubscriptionStore..ctor(String deployPath, String tempPath, ComponentStoreType storeType)
       in System.Deployment.Application.SubscriptionStore.get_CurrentUser()
       in System.Deployment.Application.DeploymentManager..ctor(Uri deploymentSource, Boolean isUpdate, Boolean isConfirmed, DownloadOptions downloadOptions, AsyncOperation optionalAsyncOp)
       in System.Deployment.Application.InPlaceHostingManager..ctor(Uri deploymentManifest, Boolean launchInHostProcess)
       in Microsoft.VisualStudio.Tools.Applications.Deployment.IPHMProxy..ctor(Uri uri)
       in Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.get_Proxy()
       in Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.GetManifests(TimeSpan timeout)
       in Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()

    Can someone help me? Thank you in advance

    • Edited by Francesco R Wednesday, February 12, 2014 4:09 PM
    Monday, February 10, 2014 10:48 AM

All replies

  • Hello Francesko,

    > System.IO.FileNotFoundException: Impossibile trovare il file specificato. (Eccezione da HRESULT: 0x80070002)

    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.

    Monday, February 10, 2014 11:45 AM
  • Hello Eugene, thank you for your response, but the problem appears in the same machine where the application previously worked. I correctly installed the application, Word correctly loaded the add-in for several weeks and then, without changing anything, the application stopped working with the above message. All in the same machine. Also some customers reported the same problem: everything worked but suddendly something broke. It looks that some dependencies are correctly loaded during installation but after some time disappear for some reason.

    Monday, February 10, 2014 1:59 PM
  • Hi Francesko,

    Did you uninstall something from the machine? Did you install any updates?

    Anyway, I'd recommend turning on the enhanced logging and checking out the results. You can read more about this in the Enhanced Logging in ClickOnce Deployment article.

    Monday, February 10, 2014 2:12 PM
  • Hi Eugene, i didn't uninstall anything, only installed system updates (win7/64). I've followed your advice and re-installed the add-in (which, after reinstall, worked; but this is not a solution since i cannot tell the costumer to do the same everytime the problem rises...) with enhanced logging. The log file don't point out any error
    Monday, February 10, 2014 4:39 PM
  • Francesco,

    I'd recommend starting from all referenced dependencies. It looks like one of them was not installed properly. Did you include PIAs to the package?

    Are you able to reproduce the issue with a clean VSTO add-in project?

    Monday, February 10, 2014 7:50 PM
  • Hi Eugene, PIAs are included in the setup package; already tried to create a new VSTO add-in project but the problem remains: the add-in works for weeks, then it stops working.
    • Edited by Francesco R Tuesday, February 11, 2014 10:24 AM
    Tuesday, February 11, 2014 10:16 AM
  • Francesco,

    Did you have a chance to check out the installation or prerequisites required for add-in when the add-in fires the exception?

    By default, the ClickOnce installer check updates every two weeks. The Chapter 8: Deploying Applications states the following:

    Unless configured otherwise, a ClickOnce-enabled application checks for updates every time it runs. You can change this behavior to a specified time interval—every two weeks, for example.

    Do you get the exception after two weeks? Is this the case?

    Tuesday, February 11, 2014 12:41 PM
  • Hi Eugene, the installer is configured to 'never check for updates', so this shouldn't be the problem. I've created a standard visual studio setup installer with all prerequisite, maybe the problem is in some aspect of clickonce configuration (even if i can't figure out what)
    Wednesday, February 12, 2014 10:04 AM
  • Hi Francesco,

    Accoring to your description, I suspect the issue may be relative to the enviroment of users. And since the issue is complex, I suggest you getting a paid support which will analyzing the issue in-depth level. Please visit the below link to see the various paid support options that are available to better meet your needs.


    Best regards


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, February 18, 2014 1:53 AM