Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

C#: Imbed an xml file in a windows application

Posted on 2008-10-19
3
Medium Priority
?
332 Views
Last Modified: 2013-12-17
Hi,

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?
0
Comment
Question by:karakav
3 Comments
 
LVL 18

Accepted Solution

by:
vbturbo earned 1400 total points
ID: 22752245
0
 

Assisted Solution

by:brenkehoe777
brenkehoe777 earned 600 total points
ID: 22752446
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
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 22752527
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.
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question