Very simple WinForms application, deployment manifest specifies to check for updates "After the application starts" every 4 days.
The load event of the form wants to know ifCurrentDeployment.IsFirstRun -- so it starts with a check of
System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed
which (after a long pause) throws:
System.Deployment.Application.DeploymentException: Lock timeout exception.
at System.Deployment.Application.LockedFile.AcquireLock(String path, TimeSpan timeout, Boolean writer)
at System.Deployment.Application.SubscriptionStore.AcquireLock(DefinitionIdentity asmId, Boolean writer)
at System.Deployment.Application.SubscriptionStore..ctor(String deployPath, String tempPath, ComponentStoreType storeType)
at System.Deployment.Application.SubscriptionStore.get_CurrentUser()
at System.Deployment.Application.ApplicationDeployment..ctor(String fullAppId)
at System.Deployment.Application.ApplicationDeployment.get_CurrentDeployment()
at System.Deployment.Application.ApplicationDeployment.get_IsNetworkDeployed()
at sfSiteTool.frmSiteTool.frmSiteTool_Load(Object sender, EventArgs e)
Of course, I willtrap this error ...but what is causing the lock exception?