• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 337
  • Last Modified:

C#: Imbed an xml file in a windows application


I am building a windows application that has xml files with data inside. I would like to embed the files in the application so that whenever the application is deployed, the data in the xml files will always be available. I don't want to put the user in the trouble of looking for the files.
Can someone help?
2 Solutions
You could add the files to your solution then on the properties for each file turn Copy Always on this way the files will always be in the output directory when the project is built
Jaime OlivaresSoftware ArchitectCommented:
Also you can declare your resource as Embedded, so it will be distributed *inside* your .exe assembly. You will be responsible to extract from the assembly and copy to file.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now