Visual Studio Rebuilds unmodified projects

前端 未结 17 1994
夕颜
夕颜 2020-12-04 08:49

So, as the title reads, I have a VS2010 solution with ~50 projects in it right now. If I make a change to a \"top level\" project that nothing references then VS still rebui

17条回答
  •  被撕碎了的回忆
    2020-12-04 09:08

    I had the same issue in VS 2015.

    What did the trick for me is:

    1. One project was referencing itself copy in some other project bin (magic, yes). This kind of stuff could be found when switching to diagnostic build output (in build options) and then trying to build projects one by one from the top of projects hierarchy - if you see the project that rebuilds even if nothing has been changed then see it's references.
    2. I've changed all "copy always" files in all projects to "copy if newer". Basically, in all .csproj files replace Always to PreserveNewest
    3. Then I've disabled NTFS tunneling as described in this article with this powershell script:

    New-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "MaximumTunnelEntries" -Value 0 -PropertyType "DWord"

    After that I needed on rebuild and it seems working for now.

提交回复
热议问题