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"

Article translations Article translations
Article ID: 911792 - View products that this article applies to.
Expand all | Collapse all

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.
This problem has been fixed in .NET Framework 2.0 SP1, .NET Framework 3.0 SP1, .NET Framework 3.5 SP1, and later versions.

Properties

Article ID: 911792 - Last Review: May 22, 2009 - Revision: 2.0
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
Keywords: 
kbappdev kbtshoot kbprb kbbug KB911792

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com