Retrieving file content in AppHarbor

I recently started creating a project on AppHarbor to try it out. And I ran into a little problem. I created small files containing jQuery templates, which I called .tmpl files and placed inside "~ / Templates /". To get the contents of one of these files, I use HttpRequest.Current.Server.MapPath(path); and File.Open , and all this works fine on my local machine, however in AppHarbor I get that the file does not exist. Is there any way around this work? Do I need to mark files in some way, or is there something I can add to my Web.config / project settings that can do this?

+7
source share
1 answer

Be sure to mark the files as Content (right-click the file in Solution Explorer, set Build Action to Content ). If you do not, the file will not be included in msbuild output, and thus AppHarbor will not be deployed.

+12
source

All Articles