I'm using an XML file added into my project with following properties :
Build Action : Resource
Copy to output directory : Copy Always
Then when the executable is running, I need the users to be able to edit the XML (add, remove and modify nodes). Is it possible ? Or do I need to change the Build Action to Content ?
Thanks
edit : i've removed it and added again as Content. But now I have another issue : When I add it to the project, it looks for it in the app root directory (WpfApplication1\WpfApplication1\myfile.xml). But then when I run the app, the function in charge to add a node works fine, but it saves the file to the WpfApplication1\WpfApplication1\bin\Debug\ directory ! Hence the "real" myfile.xml is not updated .
I'm using :
XMLHosts.Load("myfile.xml");
XMLHosts.Save("myfile.xml");
and the datasource is declared as :
<XmlDataProvider x:Key="MyfileData" Source="myfile.xml" XPath="Books/Book" />