Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6790163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:41:33+00:00 2026-05-26T17:41:33+00:00

I am confused when using resource files. In my application I need to save

  • 0

I am confused when using resource files. In my application I need to save some common file extensions. Since they are a lot, I created a xml file that looks something like:

<?xml version="1.0" encoding="utf-8" ?>

<Files>
<File>
    <Signature>3026B2758E66CF11A6D900AA0062CE6C</Signature>
    <Extension>WMA|WMV|ASF</Extension>
    <Description>WindowsMediaFile</Description>
  </File>            
  <File>
    <Signature>0000000020000000FFFF0000FFFF</Signature>
    <Extension>RES</Extension>
    <Description>ResourceFile</Description>
  </File>
  <File>
<Signature>64383A616E6E6F756E6365</Signature>
<Extension>TORRENT</Extension>
<Description>BitTorrentMetainfoFile</Description>
  </File>
..... etc
..... etc
......

I could use a .setting file instead but I guess that will not be that efficient.

Anyways I know how to retrieve data from that file. the problems comes when I plan on using this application on a different computer.

I can read data from that xml file by specifying the path: A:\Users\Tono\Desktop……FileSignatures.xml

but what path will I have to use so that it works when I deploy this application. I know I can place that file in the bin directory and then I can use the relative path. also when I select the file in visual studio I have an option:

enter image description here

If I need this file should I copy that file to the output directory so that I will be able to use it when deploying it to a different computer?

I know I will be able to probably solve this problem but I just want to make sure I am doing it the right way. I might be able to solve it but I don’t understand how it works.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T17:41:34+00:00Added an answer on May 26, 2026 at 5:41 pm

    In general, try to avoid adding additional files to your install set. If a data file will be read only forever, make it a resource and link it into the executable file so there’s no chance of it getting lost.

    If your intent is that the end user should be able to edit the contents of this data file, then it should not be a resource linked into the executable.

    In VS2010, right click on your project and select Add.., then select New Item, and select Resource File. Double click on the Resource1.resx that is created to bring up the resource editor. From the menu at the top of the resource editor, select Add Resource, then Add Existing File, and select your existing xml file on disk. This will copy the XML file into a Resources subdirectory of your project and link the file into your executable file at compile time. You can access this data as a string via the generated Resource1 class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay, I'm confused here. I have a properties file with some SQL scripts that
I'm sometimes confused to using which one of them, say I have a function
I am interested in parsing regexes (not to be confused with using regexes for
When using one of the various JDBC template methods I am confused on how
I am using a UITextView and I am confused about making the keyboard to
I'm confused about the correct way of using asynchronous socket methods in C#. I
I'm confused on how I should return errors to a client using SOAP. I
Very confused here, trying out the yuicompressor on a simple javascript file. My js
I've searched around using google but I'm completely confused on how to load an
I'm still confused... When we write some thing like this: Object o = new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.