Solved

C#: Imbed an xml file in a windows application

Posted on 2008-10-19
3
329 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 18

Accepted Solution

by:
vbturbo earned 350 total points
ID: 22752245
0
 

Assisted Solution

by:brenkehoe777
brenkehoe777 earned 150 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
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…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

615 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