How to update a TXT resource?

I have a text file that I have included in a Visual Studio 2005 (C#) project.

I recently updated the file in a text editor, but now, whenever I build the solution, the program somehow uses the *old* text file -- which I have confirmed is nowhere on my hard drive.

Note that I didn't change the name of the file; I simply updated its contents, which are now very different from what they were before (so there's no chance that I could be getting the same output).

So, why is my program still running as though the contents of my TXT file haven't changed??  The old file must be cached somewhere, but I can't find it.  I tried cleaning my solution, removing the re-adding the text file as a project resource, and manually deleting build files -- nothing has worked.

-- Milo
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Try the following:

Select the file in the Solution Explorer and change the properties as follows:
- Build Action: Embedded Resource
- Copy To Output Directory: Copy if newer (or Copy Always)

This should ensure that it will leave the file as standalone as well as copy it to the output folder for the project. It should in general also include it if you create a ClickOnce installation.
MiloDCAuthor Commented:
qalar71, that didn't work.  Same result.

I wonder if my problem has something do to with the way in which I am -- or rather, am not -- specifying the TXT file in my C# code.

Currently, I refer to it simply as "myFile.txt."  Should it first be defined as some kind of resource object?
MiloDCAuthor Commented:
Yeah, I'm Googling around and it looks like I need to create an Assembly object that I can use to access an embedded resource.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.