2

I have some C# and F# projects that were migrated from .NET Framework 4.6.1 to .NET Core 2.0. After modifying one source file and building in VS 2017 it keeps rebuilding several (sometimes all) projects every time I select "Build Solution" without further changes. I can see this from the final line of the output:

========== Build: 3 succeeded, 0 failed, 11 up-to-date, 0 skipped ==========

Building from the command line with dotnet build also take a long time, though I can't be sure that it's rebuilding, because it doesn't output a count of how many projects were rebuilt, like VS does.

How do I troubleshoot why unchanged projects are being rebuilt?

3
  • @R. Richards: Why waste extra time for no reason?
    – Thomas
    Mar 5, 2018 at 3:51
  • Did you ever find any solutions to this?
    – Diana
    Aug 5, 2022 at 15:18
  • It doesn't happen to me now, but I don't remember when or how it stopped - it's been too long.
    – EM0
    Aug 15, 2022 at 7:51

1 Answer 1

1

There are still a few bugs with the "up-to-date" check in visual studio, especially if there are items marked as "copy to output directory" in subfolders.

The projects aren't actually recompiled, but an MSBuild-"build" is triggered that will check for all inputs (and then do nothing). For the "up-to-date" projects, VS skips invoking MSBuild completely which makes it faster.

You can check for similar issues or report new issues for the up-to-date check at https://github.com/dotnet/project-system

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.