项目“<project name>”不是最新的。输入文件“<static file>”在输出文件“”之后被修改

Project '<project name>' is not up to date. Input file '<static file>' is modified after output file ''

我正在创建一个 typescript 项目(项目类型 - 使用 Typescript 的 Web 应用程序),其中包括 typescript、javascript 和其他静态文件。

我正在使用 Visual Studio 2015 构建环境,以及 Microsoft.TypeScript.MSBuild.1.8.11 nuget 包进行实际编译(即不使用 tsconfig.json)。

我有一个 Post-build 事件任务,它具有“触摸”其中一些静态文件的副作用。当我随后触发另一个构建时,我在输出中收到警告*:

Project '<project name>' is not up to date.
Input file '<static file>' is modified after output file ''.`

并且项目被迫重建。

任何人都可以想一想当 VS2015 谈到“output file ''”时我指的是什么吗?

回答我自己的问题 - 希望它能帮助其他人。

文件 VS 报告为“output file ''”,似乎与 bin 文件夹中的输出 dll/pdb 文件有关,但也与 obj/$(Configuration) 文件有关在编译过程中构建。

所以,如果我执行:

touch obj\Debug\myProj.dll obj\Debug\myProj.pdb
touch bin\myProj.dll bin\myProj.pdb

在我的 post-build 任务中,这似乎解决了问题并使编译器恢复到我期望的状态:

 ========== Build: 0 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========

我刚刚删除了 .vs 文件夹并清理了解决方案,然后工作正常。