Visualstudio-docs: How to troubleshoot "------ Skipped Build: Project: MyProject ------"

Created on 22 Mar 2019  Â·  7Comments  Â·  Source: MicrosoftDocs/visualstudio-docs

@gewarren
Please see our conversation here: https://github.com/MicrosoftDocs/visualstudio-docs/commit/572312c5de220dc2e1615fc3edb7e0cb5b003cf6#commitcomment-32880142

"Can you please add documentation around how to debug "------ Skipped Build: Project: ------" messages in Visual Studio? MSBuild.exe has -fl (or -fileLogger) flag to log such messages, but I do not see a similar configuration in Visual Studio."

I believe most of the time this problem arises when the sln file is corrupted.

Related StackOverflow Q&A:

  1. https://stackoverflow.com/questions/54038485/diagnosing-why-visual-studio-skips-building-a-project
  2. https://stackoverflow.com/questions/1319772/how-to-determine-why-visual-studio-might-be-skipping-projects-when-building-a-so
Pri2 doc-enhancement support-request vs-ide-compiltech

Most helpful comment

Checking with the engineering team to see if it's possible to add diagnostic information on skipped projects.

All 7 comments

@gewarren Actually, I think it was the C# version of the same document, which seems out-of-sync with the Visual Basic one. https://docs.microsoft.com/en-us/visualstudio/ide/how-to-specify-build-events-csharp?view=vs-2019

In particular, this warning/note was helpful but "not helpful enough":

Pre-build events do not run if the project is up to date and no build is triggered.

In other words, I came to this web page for help because the first suggestion a coworker made when I was trying to figure out "Why is my project not building?" was to suggest adding a pre-build event. However, the web page then told me, No, you can't use that for this.

It seems to me that a proper Call To Action is to say, you can't do that here, but we realize that's what most people expect, so here is how you do it.

By the way, my boss spent 2 days upgrading a solution and then rolled it back and gave up, and it turns out the root cause was a corrupt sln file where he accidentally removed a single F# project from a sln containing mostly C# projects. I guess he did this with the intent of adding it back, but forgot to do so.

This is the second place I've worked where there's been a random F# project that gets called from a c# project and the whole experience is hard on most C# only developers who get stuck with it - I joined after it was built and am the only person who can read/write F#.

Checking with the engineering team to see if it's possible to add diagnostic information on skipped projects.

I added a section to the topic https://docs.microsoft.com/visualstudio/ide/how-to-exclude-projects-from-a-build. This covers skipped projects due to timestamp (up-to-date already), and skips due to build configuration.

Any way to resolve this? It keeps happening to people on my team, has collectively burnt a few days of dev time due to random projects being skipped for no reason with no warning.

Was this page helpful?
0 / 5 - 0 ratings