Results 1 to 2 of 2

Thread: Text File Deployment and Access

Hybrid View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2006
    Posts
    75

    Text File Deployment and Access

    VB .NET

    I need a text file to be deployed along with my project for access.

    I have already done the following:

    1. 'Add New Item' text file
    2. This text was placed in 'Solution Explorer' as myfile.txt
    3. I have modified the file as needed for access

    1. How do I access it without a path? I have tried different variations of my. but can not find it.

    2. Will this file automatically be deployed with all my other files considering that it is in 'Solutions Explorer'?

    Thanks,

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Text File Deployment and Access

    It won't be deployed unless you tell it to. The best way to do that is to set its Build Action to Content, then add a project output to your Setup and select Content. Now all Content files will be deployed. Obviously at run time you need some way to identify where the file is located. Where is it located? The same folder as the application? In that case you'd use Application.StartupPath.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width