Visual Studio 2012 project always out of date (.cs modified)

十年热恋 提交于 2020-01-14 12:13:40

问题


We have one project that is used in nearly all other projects in our solution and for some time the whole solution is always rebuild, because a source file in this one project seems to be modified.

1>Project 'Utilities' is not up to date. Input file '[...]\utilities\logging\result.cs' is modified after output file '[...]bin\Debug\Utilities.pdb'.

But the file isn't modified at all nor any other file in this project.

Has anyone a hint for me where the problem could be located? Thanks in advance!


回答1:


Could you check what is the timestamp of the file in question? Could it be set by mistake to some future date? This would force a recompile... Refer https://stackoverflow.com/a/2651443/1336068 for more information.

Also, https://stackoverflow.com/a/775272/1336068 has general information on how to avoid rebuilding your code every time you run your application project in visual studio.




回答2:


I got this message whenever I ran some unit tests for a site. It was a .js JavaScript file that I had edited. It hadn't caused the PDB recompile, so the build always thought this was a modified file, and therefore required a rebuild.

A clean and rebuild fixed this.




回答3:


I was getting a similar error related to the dll and pdb file. It turned out that there was a circular dependency between projects (ie in the Project References) that was causing the dll to be touched after it was compiled. Removing the unneeded reference fixed it.



来源:https://stackoverflow.com/questions/21402633/visual-studio-2012-project-always-out-of-date-cs-modified

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!