appharbor上的xcopy-不复制文件

时间:2012-08-19 00:54:57

标签: appharbor

我有一个post build事件,它将邮件模板从项目复制到MVC应用程序的bin。这在本地和应用程序当前的实时环境中工作。我的应用程序在appharbor上构建得很好,但是当它需要发送电子邮件时,它无法在光盘上找到模板。

构建活动:

xcopy  $(SolutionDir)PostHope.Web.Common\MailTemplates $(TargetDir)\MailTemplates\ /S /Y /R

错误:

Could not find a part of the path 'D:\websites\aa\923ad\15823\0x0001\_PublishedWebsites\PostHope.Web.UI\bin\MailTemplates\NotifyNewPostIt.txt'.

我还尝试将每个模板标记为Copy Always,但仍然无效。我下载了构建版本,看起来MailTemplates目录被编译到了带有构建工件的根目录,但它并没有放在_PublishedWebsites目录中的Web应用程序的bin中。如何将其移动到我的应用程序的bin中?

1 个答案:

答案 0 :(得分:0)

问题可能是你需要确保MailTemplates目录存在,然后再复制那里。