I think you are saying that the file is in the same directory as the .exe file (ie. Debug directory) when you are developing (which works fine) but does not work when deployed. This is not a good practice. The file should be set up to be used in a writable directory relevant to the application. A simplistic example would be "C:\Program Files\myapp\appfile.exe" for the app and "C:\Users\me\Documents\myapp\appfile.xml". These are simplistic examples and you should generalize the details by asking the operating system for the correct parent directory names (these differ by OS language and 32/64 bit OS for example). If the data is static it should be installed by the .msi; if it is dynamic it should be conditionally written and maintained by your app when it runs (eg. do you want to overwrite it when you update to a newer version of the software?).
I am not explaining myself very well. Here
] is an excellent article that gives more robust details.