views:

210

answers:

2

I'm tring to run build of C# solution on vs2008 and discovered that pre-build events for projects containing in the solution were not executed. What can be reason of such behavior ?

+1  A: 

Some things to check:

  • Do they execute with a full rebuild
  • Check the Build Configuration Manager - is the project included in the build for the configuration and platofrm you're building?
  • Add an 'echo' statement to the pre-build events to check that it really isn't being run.
marklam
Checked with rebuild solution and added echo : pre-build events actually not executed - I can see that echo not peformed
Is the project with the event being built? You can check what's been built or skipped in the 'Output' window. If the project is skipped then you should check that it's selected for Build in the Configuration Manger (on the Build menu).
marklam
I already found the problem : file Microsoft.Common.targets ( from folder %windir%\Microsoft.NET\Framework\v3.5 in which defined target "PrebuildEvent" was corrupted . After replacing by correct one the issue resolved . Anyway thanks a lot to all
A: 

Open configuration manager for the solution (right click on the solution, select "Configuration manager...") and check is your project selected for build when solution is build for active configuration.

Perica Zivkovic