136

I am debugging someone else's work and the solution is quite large. When I try to build the entire thing, several projects within the solution don't build and just skip. Viewing the output window during the build process says:

1>------ Skipped Rebuild All: Project: pr1lib ------

How can I determine why these builds were skipped? I am unable to find additional output.

This is with VS2008 and the solution is comprised of c# and c++ code.

abatishchev
  • 98,240
  • 88
  • 296
  • 433
Matt
  • 25,943
  • 66
  • 198
  • 303
  • In addition to the answers provided, make sure the solution configuration settings has each project in the checked state (checkbox is checked) that should be cleaned / built: `Build > Configuration Manager: check as needed` – Metro Smurf Jun 19 '16 at 20:16
  • 2
    To troubleshoot why projects get skipped. Make sure to add `/fl` to the build settings to get a msbuild.log file which includes the reason. For example: `skipped, due to false condition; ( ('$(Configuration)' == 'Release') and ('$(Platform)' == 'Any CPU') ) was evaluated as ( ('Debug' == 'Release') and ('AnyCPU' == 'Any CPU') ).` – T_D Jun 06 '17 at 10:23
  • 4
    @T_D - where in Visual Studio would I add '/fl'? Where would the log appear? If you add this as an answer I'll upvote, since most of the other answers are various random guesses to address the problem rather than answer the original question, which was simply about getting more information about the problem. – PaulG Jan 04 '19 at 10:48
  • @PaulG See my answer below. Just set the settings in the Options. – Darren Aug 21 '19 at 03:01

39 Answers39

113

Right click the solution, choose Properties and then Configuration Properties. Here you can choose which projects to build.

[edit]:
See Kdt's comment: ... when I looked in configuration properties ... the project build target was configured for "Mixed Platforms" while the solution was set to build "Any CPU".

*When this problem happened to me, The main project only had 'Any CPU' and it set the child dll to 'any CPU' too, however, I'd deleted that profile and left only 'x86'. Picking x86 for just the dll make it start working
[/edit]

FastAl
  • 6,194
  • 2
  • 36
  • 60
Tchami
  • 4,647
  • 1
  • 32
  • 45
  • 21
    I was having a mysterious "Skipped build", and when I looked in configuration properties the project was indeed marked for build. However, the project build target was configured for "Mixed Platforms" while the solution was set to build "Any CPU" -- changing these to match fixed the problem. – kdt Dec 29 '09 at 14:10
  • 4
    In my case, although all projects and the solution were all set to "Any CPU", one project skipped building. It was only after I set the solution to "Mixed Platforms" then back to "Any CPU" that it would build. Looking at a diff of the solution file before and after, it changed from `{784BDC39-5783-4128-956E-99EA062FA8FB}.Debug|AnyCPU.ActiveCfg = Debug|AnyCPU` to `{784BDC39-5783-4128-956E-99EA062FA8FB}.Debug|AnyCPU.ActiveCfg = Debug|Any CPU`. The only difference is the added space between "Any" and "CPU" at the end of the line. – Simon Elms Jul 16 '15 at 01:05
  • 9
    In my case, all the projects were set to "Any CPU" and issue solved by removing the projects _(removing the project does not cause the files to be removed)_ and re-adding them to the solution. – Hamid Mayeli May 20 '19 at 14:33
  • This solution worked for me in `Visual Studio 2019`. With a mixture of C# and C++ projects, only the C++ projects had the problem. Manually selecting `Rebuild` on a C++ project rebuilt the source code, but `Build Solution (F7)` did not. This answer pointed me in the right direction (thanks!) => all the C++ projects were not configured to build in the solution. VS2019 may turn off builds for C++, possibly for efficiency or possibly due to the `Platform` setting. – AlainD Nov 10 '22 at 17:48
  • I have a custom made csproj with no `Debug`. In configuration manager I could see the mismatch: It didn't auto-add release configuration any more. Fix was to add `` – jifb Jun 23 '23 at 15:53
65

Build, rebuild, and clean operations were being skipped. Unloading and reloading didn't help, and neither did restarting Visual Studio.

Once I removed the project from the solution and added it back, it is no longer skipped. To remove it, in Solution Explorer, right-click the project > Remove > OK. To add it back, in Solution Explorer, right-click the solution > Add > Existing Project and select your project

user1325179
  • 1,535
  • 2
  • 19
  • 29
  • 11
    Keep in mind you will have to re-add all ProjectReferences to that project. – Joseph May 03 '19 at 18:42
  • 2
    ^^^ what he means is that you will have to re-add this project as a reference to all other projects that need it. Alternatively, you can use your version control system's "revert" command to revert the changes in all project files and only keep the changes to the solution file. Removing a project and re-adding it to the solution causes all mentions of the project in the solution file to be moved to the end, and this appears to be the magical incantation that fixes the problem. – Mike Nakis Sep 26 '22 at 17:27
  • @MikeNakis I only have a project in the solution and it just happened to me. This fixed the issue. – KulaGGin Jul 30 '23 at 19:18
54

I just had the same problem- "unload project" and "reload project" solved the issue !

  • 1
    I have the same issue, and unloading/reloading does work, but the problem seems to come back which is annoying when it happens to a bunch of projects and you have to un/reload each of them... Anyone know if there is a way to avoid this altogether? – Liron Mar 09 '11 at 23:01
  • This fixed the issue for me when Visual Studio was erroneously reporting projects as being already up-to-date in the output window, when attempting to do a build. – Kevin Laity May 26 '13 at 14:41
33

Restarting Visual Studio did the trick

Mohammad Fneish
  • 829
  • 1
  • 9
  • 20
  • 1
    I don't know why I didn't just try this first, but I tried the accepted answer first, then unload/reload of project, and then finally just restarted VS. It worked, shocker. Sometimes the obvious solution gets lost! Using VS 2017 Community – Lauren Moylan Feb 16 '21 at 14:55
13

My solution is the same as mentioned previously: Delete -> Add existing project

But this solution implies that references between projects get gone

To avoid re-adding references: and in case if you use version-control system like GIT or TFS or whatever, it is possible to achieve goal with the following steps:

  1. Make sure that all the changes are committed / checked-in before the operation

  2. Go through all projects deleting them from solution and adding-existing them

  3. Notice that the .sln file has changed

  4. Keep the new .sln file, but undo the changes to all the .csproj files with the version-control system

Crono
  • 10,211
  • 6
  • 43
  • 75
Andrey K.
  • 665
  • 8
  • 29
11

If the confixguration is x64 and the x64 compiler isn't installed it will skip the project.

Dave
  • 111
  • 1
  • 2
  • 1
    +1 Genius. You can find SP1 here: http://www.microsoft.com/download/en/details.aspx?id=10986 – ashes999 Feb 01 '12 at 16:34
  • When x64 compiler is not installed, then you cannot even select x64. – Calmarius Jan 28 '13 at 13:40
  • The solution and project configurations can define and use an entry titled "x64". The 3rd ddl for processor arch.(platform target - halfway down the build properties page) is the one that isn't available – StingyJack Feb 06 '17 at 13:04
10

I had a weird one that may be worth documenting amongst the other possibilities here..

I'd added a Shared Project to my solution, with code that was used in two or three of the other projects. As you're aware - Shared Projects are just code, and not really a project in the traditional sense.. You can't 'build' a shared project, it's just code that is embedded into the other projects, and then built there.

But somehow my solution file had been updated as if the shared project was it's own thing that needed building. I'm guessing then that any time I was trying to build and I hadn't changed the code in the shared project, then it figured 'nothing has changed, skip those builds'

I found the shared project in the solution.sln file like:

Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Api.Common", "Api.Common\Api.Common.shproj", "{EC580471-D78A-4509-AC46-BD565553AD60}"

..which is fine. What isn't fine is that this project also appeared in the GlobalSection(ProjectConfigurationPlatforms) = postSolution like:

    {EC580471-D78A-4509-AC46-BD565553AD60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    {EC580471-D78A-4509-AC46-BD565553AD60}.Debug|Any CPU.Build.0 = Debug|Any CPU
    {EC580471-D78A-4509-AC46-BD565553AD60}.Release|Any CPU.ActiveCfg = Release|Any CPU
    {EC580471-D78A-4509-AC46-BD565553AD60}.Release|Any CPU.Build.0 = Release|Any CPU

I removed those four lines from my .sln file, and now things seem happy again

PaulG
  • 13,871
  • 9
  • 56
  • 78
  • 1
    Great! This was it! I removed _every row_ from the .sln file that started with a row that only said "Global" and removed all rows down to "EndGlobal". Then it worked again. – Ted Feb 21 '20 at 12:26
  • 1
    When I removed them, they were added back automatically when I built the solution, however they came back with all four entries set to equal Debug|Any CPU. But it did fix my problem. – EspressoBeans Oct 26 '20 at 22:58
  • This was my issue as well. I removed all build configuration entries associated with the shared project GUID, and compilation worked once again. Very baffling. – Zoop Nov 11 '20 at 03:14
  • N/A for VS2019 (16.11.21) - it doesn't create build configuration for shared items projects – AntonK Dec 10 '22 at 21:46
  • This solution worked for me. I am not sure how they ended up in project configuration platfroms section though. – Ognjen Babic May 18 '23 at 14:11
6

I've just had this issue, and was able to resolve it by removing the hidden .vs folder in the topmost folder. After restarting Visual Studio everything worked again.

Nino van der Mark
  • 622
  • 1
  • 9
  • 19
5

The first thing you need to do is diagnose why the build is skipping projects. So to get a detailed build output change the verbosity to detailed in the following place in Visual Studio.

enter image description here

Darren
  • 1,352
  • 5
  • 19
  • 49
  • 16
    The verbosity settings don't help unfortunately. The output still only says 'skipped project' without explaining why. – PaulG Aug 21 '19 at 08:50
5

The visual studio 2008 , it can be because 64 bit compiler wouldn't have installed.

Control Panel --> Programs and Features -> Microsoft Visual Studio 2008 professional --> [double click]

On Visual Studio Dialog

Next --> Add/ remove Features --> (Under) Visual C++ --> (select) x64 compiler and Tools

Andy Thomas
  • 84,978
  • 11
  • 107
  • 151
Anish A R
  • 61
  • 1
  • 1
4

Problem exists in VS 2010 as well; of the proposed solutions: editing build config, cleaning, changing/re-changing target framework, do NOT work. But unloading and reloading the project does.

Mark Alsip
  • 41
  • 1
3

Hey, just fixed this one. Thought it might help. You most likely didn't install corresponding compilers along with the visual studio. This happened to me today - by default, VS 2008 installer doesn't install x64 C++ compiler.

If you have SP1, uninstall it before changing VS installation. When done, install SP1 again.

3
  1. Close visual studio
  2. Open the sln file with notepad
  3. delete all of the things like this : {B546C55D-9321-4FC0-B25C-46844222BEBE}.Debug with Fakes|x86.ActiveCfg = Debug with Fakes|x86 (there will be a bunch of them)

4.save the file 5.open visual studio and all better

  • 2
    Why does this help? Add some explanation and be as detailed as you can so future readers can help understand why you needed take those steps. –  Feb 13 '19 at 22:48
3

Right click on solution ->Remove then Add the existing project, this worked for me.

srib
  • 31
  • 1
2

Go to the build menu and choose "configuration manager". This will show which projects are configured to build in your selected configuration.

1800 INFORMATION
  • 131,367
  • 29
  • 160
  • 239
2

I had a similar thing just happen to me. I'm not sure what the problem was, but it would not Clean, Build, Rebuild, etc. I am operating in Visual Studio 2017 and wanted a netstandard2.0 assembly. The issue for me was that somehow the project type was incorrect, maybe I started from a netcoreapp class library, something like that, stuck in the Solution file, I do not recall. Anyway, I backed up the project, created a new netstandard class library project, and factored in the backed up bits, and that fixed it for me. HTH someone.

mwpowellhtx
  • 351
  • 1
  • 9
2

i updated to 15.9.11 , ... after some builds, same problem:most projects are skipped (which build a second ago without problems). Unloading/reloading the solution helps always in my case, but it will happen again soon.

I have no idea why... except a big bug in VS2017

I checked configuration manager , all checkmarks are set to build.

Maybe, it has something to do with nuget packages, but that is just a guess

The solution has only c++/vcxproj, no csproj. 64 and 32 are installed both

Timm
  • 51
  • 5
2

I checked-in my project to source control from one computer and downloaded it to another and it will not build properly there. It will skip building projects and didn't even create the master \Debug folder for outputs.

The solution (VS2019) is to right click on solution and select Configuration Manager.

I saw the build checkbox was not checked for two projects that I was building (shown below). I don't know why they were unchecked but checking them and building project worked!

enter image description here

zar
  • 11,361
  • 14
  • 96
  • 178
2

This happened to me in VS 2019, and the solution was to simply restart visual studio. My build configuration was never modified.

Josué Zatarain
  • 791
  • 6
  • 21
1

Right click on Solution at at your solution explorer, then, click on Property at bottom of the menu. In the property windows, click on Configuration Properties -> Configuration on the left pane, you will see the list of projects on right pane, make sure Build check box is checked in the popup window.

TonyXu
  • 11
  • 3
1

Had the same problem, found out that the project setting was for Itanium CPU, changing it to Intel fixed it.

Sabuncu
  • 5,095
  • 5
  • 55
  • 89
1

If your solution contains a NuGet project (*.nuproj) file, try unloading it and then rebuilding your solution.

This worked for me after none of the above worked.

FrequentGuest
  • 182
  • 2
  • 11
1

I had similar problem, I had one project which could not load in solution explorer due to some reason. When I loaded that project it worked like a charm.

1

Was running into the same problem with VS2005, all the configurations were correct . It was even skipping the Clean project command.

Finally Unloading /Reloading did the magic.

Prakash
  • 742
  • 7
  • 19
0

I had this problem with some Windows CE projects on a new PC. "Unload project" and "Reload project" appeared to fix the problem, but actually Visual Studio had simply switched to a different platform and built that.

It turned out that although my WinCE platform was shown as the active platform, Visual Studio didn't "really" see it. The solution was to reinstall the WinCE SDK with administrator priveleges:

  • Make sure Visual Studio 2008 is not running.
  • Open a “Visual Studio 2008 Command Prompt” as Administrator. On Windows 7 just right click the short cut and pick the “Run as administrator” option.
  • Enter the following command: msiexec /log SDKInstallLog.txt /package <the path to your .msi file>
  • When asked if you wish to do a custom or complete install pick custom, and instruct the installer to omit the installation of the documentation (this step was not necessary in my case; in fact I just asked it to "repair" the existing installation.)
  • Install
Qwertie
  • 16,354
  • 20
  • 105
  • 148
0

VS 2008 will skip x64 targets if you don't have the x64 compiler installed. VS 2008 does not by default. Kind of a duh, thing.

0

I had a very similar issue after generating a project from a decompiler from Telerik, then trying to recompile it. The project was skipped whenever I tried to rebuild it. Tried a lot of the suggestions above, but for me, it was the .NET Framework selected in the project properties.

Right-click project in solution file, select properties, application tab, change target framework from 4.0 to 3.5.

Then, rebuild, and I got a bunch of assembly reference missing errors, which makes sense since I haven't added references to them yet.

Elmer
  • 139
  • 1
  • 4
0

I update one small update of Visual Studio 2017 and then the installer reminds me to restart my computer,but I did not restart.When I build my project or solution in Visual Studio 2017,I meet the same above problem.I guess the update maybe the key,so I restart my computer,I did it.:>

Farb
  • 468
  • 6
  • 11
0

I had this problem in Visual Studio 2017 15.9.4 and after some searching and putting some time I found out that in my solution the .csproj file of one of projects got corrupted after merging in TFS. (I could build other projects by unloading the problematic project from solution). How I resolved my problem was that I compared the .csproj file before and after the merge and do fix that. And by fix I mean since my own project's type was .netStandard I removed unnecessary lines including Configuration PropertyGroup, all and others in the new .csproj file to make it similar to previous .netstandard-style version.

VahidShir
  • 2,066
  • 2
  • 17
  • 27
0

I just got into this trouble:

Had updated VS 2017 to latest version 15.9.11 and few of my projects were updated to .net core 2.2. I initially loaded all projects tried building/ cleaning/ rebuilding and everything were skipped. Followed the below to resolve:

  1. I unloaded each project and reloaded them.
  2. Closed all instances of VS and opened VS as an administrator (right click the short cut and pick the “Run as administrator” option)

That's it everything was back in action and I was able to build all projects successfully.

chethandb
  • 1,021
  • 1
  • 9
  • 17
0

I find that sometimes when you have target platform as set to lets say x86 in your solution and in your projects the project does not actually always had it selected.

To double check go to the project properties and see if you can select that platform in the Build->Platform setting if you can not then you will need to go to the configuration manager and create that configuration.

TriStar
  • 173
  • 1
  • 4
  • 14
0

The visual studio 2017

After adding the configuration in the Configuration Manger

Right Click on the Project -> Project Only -> Build Only / Rebuild Only / Clean Only

if all the other settings are correct .

mail2subhajit
  • 1,106
  • 5
  • 16
0

Issue: Rebuilding, Build, Clean was skipping all my projects except two of them.

Solutions that didn't work for me:

  1. Solution configuration settings were as expected so no changes in them helped.

  2. Unloading and reloading didn't work.

Reason of occurrence:

This was happening because the target .NET framework was higher (4.7) for those 2 projects but lower for the other projects. A prompt had initially popped up asking me to install .NET 4.7, which I did, but it turns out it was unable to recognize that it is installed without restarting my machine.

Solutions that worked:

  1. Restarting my machine did the trick. After restarting it correctly recognized that .NET 4.7 is installed.
  2. Alternatively, downgrading the target framework of the project by right clicking on the project -> Properties -> Application -> Target Framework and setting it the same as the other projects which were getting skipped, also solved the issue.

I would recommend installing the latest .NET Framework and restarting machine to avoid running into further problems.

Sonali Agrawal
  • 303
  • 4
  • 14
0

It will skip builds on any projects that have dependent projects that have failed to build.

mcmillab
  • 2,752
  • 2
  • 23
  • 37
0

Removing .\obj and .\bin directories did the trick.

Patrick from NDepend team
  • 13,237
  • 6
  • 61
  • 92
0

Set everything to not build in Configuration Manager, rebuild, set everything to build in Configuration Manager, rebuild did the trick. Magic!

sunamo.cz
  • 59
  • 6
0

I had this mysterious "skipping" problem with one C++ project (DLL) in VS2019/VS2022.
This project was copy'n'pasted from another product, and it had same problem there (so I guess the issue has ancient roots).
I've tried all solutions proposed by otheres (including removing ProjectGuid from .vcxproj - VS just generates a new one).
Worth noting that this strange thing happened only to one project in the solution, while other similar projects (C++ DLLs) were built fine, and that's where the cause is.
By comparing the content of .vcxproj files I discovered the key difference - the 'lazy project' had such fragment:

  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <LinkIncremental>true</LinkIncremental>
    <IncludePath>$(ProjectDir);$(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
    <ExternalIncludePath>$(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath);</ExternalIncludePath>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <LinkIncremental>false</LinkIncremental>
    <IncludePath>$(ProjectDir);$(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
    <ExternalIncludePath>$(SolutionDir);$(VC_IncludePath);$(WindowsSDK_IncludePath);</ExternalIncludePath>
  </PropertyGroup>

I goes right after the line:

<PropertyGroup Label="UserMacros" />

which in my case was also followed by another ancient fragment:

  <PropertyGroup>
    <_ProjectFileVersion>11.0.61030.0</_ProjectFileVersion>
  </PropertyGroup>

but it was removed ealier. Removing both fragment (though I guess dropping the first one is enough) immediately solved the problem in my case - the project is built on each source change.
The bottom line: if your project is skipped for unknwown reason and it was migrated from an earlier version of VisualStudio, compare its content against the project which is being built as expected.
Applicable to VS2019 (16.11.21)

AntonK
  • 1,210
  • 1
  • 16
  • 22
-2

make sure you do a "clean" first .. Visual Studio typically won't re-build a project that isn't out of date (as far as it's concerned) and will just re-use the object code it already has.

Running a clean should clear out all previously compiled code and VS shouldn't skip the project (assuming the configuration manager has the projects selected to build ... see previous answer).

Hope that helps.

Robert French
  • 686
  • 4
  • 12
-2

I had the same problem, Unloading and then again reloading the project will definitely resolved this issue.