Error message when you try to run an updated version of an application that was created by using Visual Studio 2005 application and the ClickOnce feature: "System.IO.DirectoryNotFoundException" (911792)



The information in this article applies to:

  • Microsoft Visual Studio 2005 Express Edition
  • Microsoft Visual Studio 2005 Professional Edition
  • Microsoft Visual Studio 2005 Standard Edition
  • Microsoft Visual Studio 2005 Team System Architect Edition
  • Microsoft Visual Studio 2005 Team System Developer Edition
  • Microsoft Visual Studio 2005 Team System Team Foundation:
  • Microsoft Visual Studio 2005 Team System Test Edition

SYMPTOMS

When you try to run an application that was created by using Microsoft Visual Studio 2005 and the ClickOnce feature, you receive the following error message:
System.IO.DirectoryNotFoundException

The system cannot find the path specified. (Exception from HRESULT: 0x80070003)

at System.Deployment.Internal.Isolation.IActContext.SetApplicationRunningState(UInt32 dwFlags, UInt32 ulState, UInt32& ulDisposition)
at System.ActivationContext.SetApplicationState(ApplicationState s)
at System.AppDomain.SetupDomainForApplication(ActivationContext activationContext, String[] activationData)
at System.AppDomain.SetupApplicationHelper(Evidence providedSecurityInfo, Evidence creatorsSecurityInfo, ApplicationIdentity appIdentity, ActivationContext activationContext, String[] activationData)
at System.AppDomain.SetDomainManager(Evidence providedSecurityInfo, Evidence creatorsSecurityInfo, IntPtr parentSecurityDescriptor, Boolean publishAppDomain)
at System.AppDomain.SetDefaultDomainManager(String fullName, String[] manifestPaths, String[] activationData)
This issue occurs after you deploy an updated version of the application.

CAUSE

This issue can occur when the folder structure in the updated version of the application does not match the folder structure in the original version of the application. The data files from the first version of the application are not copied correctly into the folders that are created when you install the updated version of the application.

WORKAROUND

To work around this issue, change the folder structure in the updated version of the application to match the folder structure in the original version of the application. Then, re-deploy the application.

Note To avoid this problem, do not change the folder structure of a ClickOnce application.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.

Modification Type:MajorLast Reviewed:3/14/2006
Keywords:kbAppDev kbtshoot kbprb kbbug KB911792 kbAudDeveloper