MSBuild 4.5 is ignoring project dependencies

后端 未结 6 1743
醉话见心
醉话见心 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:31

    In .NET 4.5, the default value of the OnlyReferenceAndBuildProjectsEnabledInSolutionConfiguration property in C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets was changed from false to true. As its name implies, this property causes MSBuild to ignore references to projects that are excluded from the build configuration.

    (It's possible that Microsoft made this change in response to a Connect bug I filed against MSBuild 4.0, even though I warned them that the change breaks the build.)

    The workaround is simple: Set the property back to false in the first section of each of your projects:

    
        ...
        false
    
    

提交回复
热议问题