Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top