.Net MVC 发布错误 - 将文件 template\hts-cache\doit.log 复制到 obj\Release\Package\PackageTmp\template\hts-cache\doit.log 失败

.Net MVC Publish error - Copying file template\hts-cache\doit.log to obj\Release\Package\PackageTmp\template\hts-cache\doit.log failed

当尝试将项目发布到本地文件夹时,出现此错误,这是第一次出现此错误,我之前发布过很多项目。

Severity    Code    Description Project File    Line    Suppression State
Error       Copying file template\hts-cache\doit.log to obj\Release\Package\PackageTmp\template\hts-cache\doit.log failed. Could not find file 'template\hts-cache\doit.log'.   Expenditure     0   

打开您的解决方案资源管理器并单击显示所有文件图标。有没有黄色标记的文件,可能是感叹号黄色标记(警告符号)。

如果是这样,请右键单击它并根据需要包含它。否则排除它然后发布。

希望对您有所帮助!!