I have a WinForms app that I deploy using ClickOnce. In the application project I have some files marked as Content which is also marked as "Data File" in the Application Files dialog in the Publish settings. I have also some content files that are marked as "Include Auto".
When I publish, install the application and then execute it crashes immediately on startup with a DirectoryNotFoundException (full stacktrace below).
Looking into the application folder I can find all files that was marked "Include Auto", neatly placed along with the executables. The files marked as "Data File" though is not installed (I have checked both the executable folders and the Data folder).
Note that publish and install is both done from a folder on my local machine, not via a website.
If I change from "Data File" to standard include on all content files, everything works as a charm.
I'm running (gasp) Windows XP SP3 and .Net 3.5 SP1.
System.IO.DirectoryNotFoundException was unhandled Message="The system cannot find the path specified. (Exception from HRESULT: 0x80070003)" Source="mscorlib" StackTrace: 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) InnerException: