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