I have a project A depending on project B. Project A has some pre-build tasks that is dependent of some generated files from project B. When I build in Visual Studio, no probl
Jack's answer seems to be working, but what I did not like about it is that support for editing the .csproj is not natively supported in the VS UI, other than the awkward "Unload project, Edit project (during which you can't click on your files as you normally would like to), Reload project" model. What I wanted was for the pre-build event to trigger after dependent projects built, and have this work the same in VS as in MSBuild. After struggling with this problem, I found a solution that works for me in MSBuild 4.0.
No matter what I tried, I could not alter the PreBuildEvents target to trigger after the dependent projects finished building. So what I did instead was to disable the PreBuildEvents target, and create a bastardized custom PreBuildEvents target that would run at the appropriate time:
false