How to determine why visual studio might be skippi

2019-01-17 13:30发布

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.

21条回答
我想做一个坏孩纸
2楼-- · 2019-01-17 14:19

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

查看更多
甜甜的少女心
3楼-- · 2019-01-17 14:21

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
查看更多
爷的心禁止访问
4楼-- · 2019-01-17 14:23

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.

查看更多
太酷不给撩
5楼-- · 2019-01-17 14:25

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

查看更多
孤傲高冷的网名
6楼-- · 2019-01-17 14:25

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.

查看更多
我命由我不由天
7楼-- · 2019-01-17 14:31

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

查看更多
登录 后发表回答