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,
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.