Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting file-content on AppHarbor

I recently started to create a project on AppHarbor just to try it out. And I've run into a small problem. I've created small files containing jQuery-templates which I've named .tmpl-files and placed inside "~/Templates/". To get the content of one of these files I use HttpRequest.Current.Server.MapPath(path);, and File.Open, and this all just works perfectly on my local machine, however, on AppHarbor I get that the file does not exist. Is there a workaround to make this work? Do I need to mark the files in some way, or is there something I can put inside my Web.config/project-settings that can make this work?

like image 909
Alxandr Avatar asked May 18 '11 00:05

Alxandr


1 Answers

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

like image 169
friism Avatar answered Oct 17 '22 03:10

friism