I have a WinForms application that I am trying to deploy using ClickOnce. It consists of an executable file and a dependent dll library, as well as a bunch of free XML files in the Map folder. All XML files appear to be present and correct in the created clickonce package and they are all included in the .manifest file.
However, when I install and run, using the following code gives me a directory exception not found:
string appPath = Path.GetDirectoryName(Application.ExecutablePath);
string mapPath = Path.Combine(appPath, "Maps");
foreach (string xmlFile in Directory.GetFiles(mapPath, "*.xml"))
when I look in the "appPath" (which is C:\Users\Mark\AppData\Local\Apps\2.0\0H6ZLXXN.30V\3TNO49OJ.8JH\midi..tion_5194807c0e95e913_0000.0004_b9d52c73fd4d58ad\), there is an application executable and dll, but the Maps folder is missing there.
What am I doing wrong? Is this the right way to link additional files with my application? I would really like the Maps folder to be somewhere where the user can easily access and add their own files anyway.
source
share