MSBuild 4.5 is ignoring project dependencies

后端 未结 6 1749
醉话见心
醉话见心 2021-02-14 23:40

I have a VS2010 solution file with over 20 projects in it, and some of the projects have dependencies on other projects from within the solution.

I also have multiple bu

6条回答
  •  [愿得一人]
    2021-02-15 00:41

    I've encountered the exact same problem. The two work-around's I've managed to find are both unacceptable for the long term, but they do overcome the initial issue of getting old our build processes working with the new 4.5 stack.

    1. Swap the project references with file references
    2. Create compound build configurations

    I've opted for #2, as file references mean the developers would lose out on real-time intellisense etc.

    The compound configurations are simply this:

    • Release Server -> All Server Projects
    • Release Consumer -> "Release Server" + Client Projects

    The problem seems to be, that if a project is not included in the current/active build configuration, that it will not include it as a referenced dependency. So, by adding the dependencies into the configuration, the projects will at least compile.

    Both ugly, but at least it get's me out of a tight spot.

    Matt

提交回复
热议问题