The following worked for me in a console program using VS 2017 but it should work in a DLL too.
Go to the project in Solutinon Explorer and right-click and add a Resources File. You have probably done that much. Then open the Resources File. At the top of that designer we have Add Resource; when I click the drop-down then Add New Text File is an option. I added a text file and put something in it.
Then during execution ConsoleApp1.Resource1.TextFile1
has the contents of the text file, where ConsoleApp1
is my project's namespace and Resource1
is the name of the resource file and TextFile1 is the name of the text file (without extension). You can use the Class View to find the name to be totally sure.
And while editing the text file in VS you can right-click on the tab with the filename and select Copy Full Path to be sure where the file is at.