It is a WPF application.
I am trying to load a xml file like the following:
XmlDocument doc = new XmlDocument();
doc.Load("../../doc/test.xml");
but when I publish using Clickonce, it won’t be able to find the document.
How should I get the current location, like basedir?
Thank you.
Try with,
Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location) this return path of executable file location.