Assuming that you want to deploy your file with the Addin archive (and not separately) you can find details here:
ProGuide-content-and-image-resources#document-content.
In brief, you set the "Copy to Output Directory" property on the text file to "Copy Always" and read the file from the assembly cache. There is code in the ProGuide showing you what to do.
However, in your case, that is probably overkill. Given your content is text I would add the "myaddin.txt" as a Resource to your solution:
- Add a resource file to your VS project (usually called Resource1.resx by default)
- Open it in the Visual Studio Designer (double click on it in the solution explorer)
- Under the "Add Resource" menu select "Add New Text File" and name it "myaddin" (see image)
- (or use the 'add existing file...' - your choice)
- The new text file will open in Visual Studio, copy and paste your content into the text file
- Save and build the project
Now, in your code you can access the file content directly off the resource class like so:
var file_content = Resource1.myaddin;