简体   繁体   中英

What does Visual Studio 2010 do before invoking msbuild?

I'm having a problem with Visual Studio not invoking msbuild to actually build my solution. Invoking msbuild from the commandline results in a proper build, but in Visual Studio starting build results in an "everything is up to date" message. Manually compiling a .cpp file seems to partially or fully fix the problem.

Restarting VS2010 does not correct the problem, so I feel like VS2010 must be writing its own dependency information somewhere. By dependency information I mean what files actually require building, AKA which files have been altered since the last successful build.

Does VS2010 perform it's own dependency checking before invoking msbuild? Where does it store this information?

To force a build to occur from the Visual Studio GUI you can select "Rebuild All". That will trigger compilation of all your source files.

The problem with regular builds not working could be related to incorrect clock settings in your PC. Make sure your system clock is correct, including the time zone. Then do a project 'clean' and try to build again.

My Dad says to check your "obj folder" and clean it out. VS2010 is seeing that there are things on there so it assumes there's nothing new to build.

I've seen this kind of behavior occasionally, though I can't explain how it gets corrupted.

Try deleting all the intermediate files: everything in the Debug and Release directories, plus the project name files of types .suo , .ncb , and .aps . Then rebuild all.

If you are experiencing the same behavior as I do, this tends to make VS work properly for awhile—a few weeks or 50-100 builds (whichever comes first).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM