MSBuild is... building everything


  • Hi!

    So I make an application in a branch of a Git repository (using GitKraken), and I wonder, as it builds for the first time, why it took so long to compile, so I look in the bin folder, and I find over 100 files, 95 of which are system reference .dll files like System.IO.File and System.Console and NuGet packages like Newtonsoft.Json. I deleted them all except the NuGet packages and my program runs fine, but the next time I compile it MSBuild does the same thing. I have deleted and re-cloned the repo. I am using VS2017 Community on a potato computer sporting a Core 2 Duo e8400, but I compiled this on a friend's PC and the same thing happened, so it's something at my end.

    Please help! :)

    -Mr. H

    Tuesday, January 2, 2018 10:48 PM

All replies

  • Hi Mr,H

    >>>I deleted them all except the NuGetpackagesand my program runs fine, but the next time I compile it MSBuilddoes the same thing.

    You said you deleted them all except nugget packages. Where did you delete them? from the bin folder or in the node of References in the Solution Explorer? If you delete it from References, you should check if this project reference other projects or add a nugget package NETStandard.Libraryor one of your package depends on NETStandard.Library, which drags tons of System.* dependencies.

    If above not help you, you can share your package list to me, or a sample so that I could reproduce this issue.

    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Wednesday, January 3, 2018 9:52 AM