How to determine why visual studio might be skippi

2019-01-17 14:02发布

问题:

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.

回答1:

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]



回答2:

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



回答3:

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



回答4:

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



回答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



回答6:

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.



回答7:

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.



回答8:

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



回答9:

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



回答10:

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.



回答11:

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.



回答12:

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.



回答13:

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.



回答14:

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.



回答15:

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


回答16:

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.



回答17:

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.



回答18:

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.:>



回答19:

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.



回答20:

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



回答21:

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.