Visual Studio 2008 Unnecessary Project Building

后端 未结 13 942
日久生厌
日久生厌 2020-12-05 06:41

I have a C# project which includes one exe and 11 library files. The exe references all the libraries, and lib1 may reference lib2, lib3, lib4, etc.

If I make a chan

相关标签:
13条回答
  • 2020-12-05 07:27

    Check out the following site for more detailed information on when a project is built as well as the differences between build and rebuild.

    0 讨论(0)
  • 2020-12-05 07:28

    I don't think there's away for you to do it out of the box in VS. You need this add-in http://workspacewhiz.com/

    It's not free but you can evaluate it before you buy.

    0 讨论(0)
  • 2020-12-05 07:35

    I had this problem too, and noticed these warning messages when building on Windows 7 x64, VS2008 SP1:

    cl : Command line warning D9038 : /ZI is not supported on this platform; enabling /Zi instead

    cl : Command line warning D9007 : '/Gm' requires '/Zi'; option ignored

    I changed my project properties to:

    C/C++ -> General -> Debug Information Format = /Zi

    C/C++ -> Code Generation -> Enable Minimal Build = No

    After rebuilding I switched them both back and dependencies work fine again. But prior to that no amount of cleaning, rebuilding, or completely deleting the output directory would fix it.

    0 讨论(0)
  • 2020-12-05 07:36

    We actually had this problem on my current project, in our scenario even running unit tests (without any code changes) was causing a recompile. Check your build configuration's "Platform".

    If you are using "Any CPU" then for some reason it rebuilds all projects regardless of changes. Try using processor specific builds, i.e. x86 or x64 (use the platform which is specific to the machine architecture of your machine). Worked for us for x86 builds.


    (source: episerver.com)

    0 讨论(0)
  • 2020-12-05 07:40

    Not sure of an awesome way to handle this, but in the past if I had a project or two that kept getting rebuilt, and assuming I wouldn't be working in them, I would turn the build process off for them.

    Right click on the sln, select configuration manager and uncheck the check boxes. Not perfect, but works when Visual Studio isn't behaving.

    0 讨论(0)
  • 2020-12-05 07:42

    If you continue to experience this problem, it may be due to a missing or out of date calculated dependency (like a header) that is listed in your project, but does not exist.

    This happens to me especially common after migrating to a new version (for example: from 2012 to 2013) because VS may have recalculated dependencies in the conversion, or you are migrating to a new location.

    A quick check is to double-click every file in offending project from solution explorer. If you discover a file does not exist, that is your problem.

    Failing a simple missing file: You may have a more complicated build date relationship between source and target. You can use a utility to find out what front-end test is triggering the build. To get that information you can enable verbose CPS logging. See: Andrew Arnott - Enable C++ and Javascript project system tracing (http://blogs.msdn.com/b/vsproject/archive/2009/07/21/enable-c-project-system-logging.aspx). I use the DebugView option. Invaluable tool when you need it.

    (this is a C# specific question, but a different post was merged as identical)

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