G'Day....
I am having a little trouble with my current project I can not seem to google an answer for. Basically I am using external text files as I want to be able to easily edit them after getting the framework of my console application up and running. I do not want to do anything simple at the moment, though I may write a simple phaser at a latter stage.
I have a test code like this....
public static string ReadDataFile()
{
string text = File.ReadAllText(@"_Debug\testData.txt");
return text;
}
The problem is when I go to test by pressing the F5 Key it is looking the the relative path of the Bin/Debug Folder in the solution.... Now I could move all the data files into that folder (and this it works) but I am sure that is not the correct way to do it.
TL;DR - How do I use paths to find data files with Fie.ReadAllText and then be able to compile a test run using F5 or a Release Build and have those DataFiles and directory structure copied to the location the binary is made so the application can run correctly. Or if I am way off track, any solution please.