12

I have a large solution of dozens of projects. Since yesterday (and for no good reason that I can find) the projects are refusing to build, with Visual Studio's build output window simply stating (eg)

1>------ Skipped Rebuild All: Project: Api.Models.Common ------

There are already a few similar q/a's here about the reasons why VS may decide to skip a build (Configuration not set to build, or set to build wrong target). I'm not interested in guesses as to why this isn't building. I'd really like answers to help me diagnose this, and have Visual Studio tell me why it thinks it can skip the build.

Is there a way to have VS generate anything more detailed than Skipped rebuild for example? It must be calling msbuild under the covers right? So can I have Visual Studio pass additional parameters to msbuild so that it generates diagnostic log output?

(For what it's worth - calling msbuild from the command line builds the projects as expected, so it seems like my issue is something quirky that VS is doing).

I'm using VS 2017 - 15.9.4

PaulG
  • 13,871
  • 9
  • 56
  • 78
  • [make sure it is selected to build](https://learn.microsoft.com/en-us/visualstudio/ide/how-to-create-and-edit-configurations?view=vs-2017) – magicandre1981 Jan 04 '19 at 15:15
  • Thanks @magicandre1981, but I went through all the obvious stuff first, and would really hope there is a better way for VS to display the *why*. I actually ended up finding [my issue](https://stackoverflow.com/questions/1319772/how-to-determine-why-visual-studio-might-be-skipping-projects-when-building-a-so/54041518#54041518), but am still hopeful someone can answer the question asked here and provide a way to diagnose future issues like this – PaulG Jan 04 '19 at 15:20
  • 1
    Logging verbosity can be set in the VS settings (Ctrl-Q, type 'verbosity) and it's probably your best bet to figure out exactly what is going on – stijn Jan 05 '19 at 09:38
  • 4
    Those verbosity settings don't seem to give any more output for a 'skipped project' though unfortunately. They still just say 'skipped' without any info as to why. – PaulG Jan 05 '19 at 09:44
  • Simplest explanation would be to search Github under Microsoft organization for this phrase. But also check last modified time – John Zabroski Mar 22 '19 at 12:25
  • Did you find a solution to this? I have two copies of the same project on different PCs, one keeps skipping the build of the main exe, the other works fine. Deleting all bin/obj folders fixes it but we dont know the cause. – rollsch Apr 07 '20 at 05:49
  • I changed verbosity to the highest possible. Got nothing additional. Closed and reopened solution, and problem was magically gone. Plenty of verbosity on actual build, instead of skipping it. – Josh Sutterfield Oct 03 '22 at 20:28

2 Answers2

0

If you have any unload projects, you must load it or you remove it in solution.

Note: My unloaded project was the result of a permission issue. VS warned that a project was configured to use IIS. To run the project with IIS required launching VS as an administrator.

John M
  • 14,338
  • 29
  • 91
  • 143
mperk
  • 324
  • 3
  • 8
-1

This was happening in my solution with Visual Studio 2019. I just migrated my applications from .Net Framework 4.6 to .NET5, almost all the projects were not building, it gets always skipped. The reason was that after the migration the tool upgrade assistant was not setting the Target Framwework as in the preceding image (Right-click on the project and then click on Properties).

enter image description here

After setting it to the right framework, in my case, it was .NET 5.0, the project started to build.

Sibeesh Venu
  • 18,755
  • 12
  • 103
  • 140