I have a file called template.html
in my project, set to Copy Always. When I run the api locally, from Visual Studio and do File.ReadAllText("template.html")
I get Could not find file 'C:\Program Files (x86)\IIS Express\template.html'.
Obviously, I could add an absolute path here, but that's not exactly portable. How can I access my file with a relative path?
Edit: my code is here. LocalPefChartinator is the main logic + CLI, Test is tests and WebInterface is the webapi bits.