How to fix visual studio 'projects out of date' message each time I run it

后端 未结 5 1165
刺人心
刺人心 2021-02-06 02:26

I have a visual studio (2005) solution file with 70 projects.
Each time I press F5 to run it, it tells me that 4 of the projects are out of date, and asks me if I want to re

相关标签:
5条回答
  • 2021-02-06 02:43

    I had the same problem with linking a .netmodule into my project that was complied with a custom build step. The prolem turned out to be that I was also linking a C++ lib and the .netmodule file was listed on the same line in the linker input.

    Example: .lib .netmodule

    Insead of: .lib \n .netmodule

    0 讨论(0)
  • 2021-02-06 02:49

    I had this problem and it turned out I had a header file added to my project but that I had deleted from the disk. Removing the non-existent header file from the fixes the behavior.

    0 讨论(0)
  • 2021-02-06 02:53

    I would run a normal Build, twice in a row. The second time, I'd set the MSBUILD verbosity to "Normal" or higher (in Tools->Options, "Projects and Solutions", "Build and Run". I'd read the output carefully to see what gets actually built the second time.

    In fact, now that I think of it, if this really is a cycle, then some part of what gets built the second time must be what's causing it to build the third time, etc. Perhaps you have a post-build step in one of the projects that touches an assembly or other resource used as input to an earlier step. With 70 projects in the solution, something like this would be easy to cause inadvertently, and hard to catch. You may have to learn enough about MSBUILD to be able to detect when one of its steps is deciding it needs to build because something changed, then to understand your solution well enough to know that nothing should have changed; then to see that something has changed that should not have changed.

    When you're done with this exercise, you may have gained some insight that will enable you to help in breaking the solution into smaller solutions.

    0 讨论(0)
  • 2021-02-06 02:56

    A quicker way than John's log verbosity in Visual Studio 2013, is to open the Solution Explorer's project tree; the files which were not found won't have the little triangle in front of the filename (with which you normally can see a list of symbols in that file).

    Remove those files and for me, the AlwaysCreate message went away (you only see 'AlwaysCreate' when the verbose level is set to at least 'Normal').

    0 讨论(0)
  • 2021-02-06 03:08

    I had this exact problem in VS2010 after I deleted some source files that were no longer used in my project. Simply selecting "Clean Solution" from the "Build" menu and then rebuilding the solution fixed the problem for me.

    0 讨论(0)
提交回复
热议问题