I'm writing a console application in Visual Basic 2008 Express.
I added several text files to my project as resources. Specifically...
- I went to my project's "Properties" page and selected the "Resources" tab.
- I clicked the "Add Resource" dropdown and chose "Add New Text File".
- I entered some simple text and saved the file as "Welcome.txt".
- I built the entire solution.
In my code, I use console.writeline(My.Resources.Welcome) to display the text.
If I run my code through the IDE, it works fine. If I run the EXE that's in the /bin/release folder, the app crashes.
My system logs show the error as "System.IO.FileLoadException".
I have tried setting the properties on the embedded text file to "Embedded Resource", but the result is the same.
Has anyone encountered this issue? Thank you in advance.