From Solution Explorer, right click on myfile.txt and choose “Properties”
From there, set the Build Action to content
and Copy to Output Directory to either Copy always or Copy if newer

From Solution Explorer, right click on myfile.txt and choose “Properties”
From there, set the Build Action to content
and Copy to Output Directory to either Copy always or Copy if newer
