In Visual Studio C++, the Prebuild event seems to go *after* project dependencies. Is there a way to make it go before? RRS feed

  • Question

  • I have a solution with 2 projects.  Let's say Project A and Project B.  Project B depends on Project A.  Project A has a pre build event set.  The build order ends up being Project B, the prebuild event, then Project A.  I would prefer it to be: prebuild event, Project B, then Project A.  Any way of doing this?

    Tuesday, December 3, 2019 10:43 PM

All replies

  • Hi Solaris783,

    Thank you for posting here.

    About the order: "prebuild event, Project B, then Project A", I'm afraid not. As far as I know, the compile will build the vcxproj file, which is file to contains all the information and instructions that MSBuild needs in order to build your project, and the build event is a component of it, so we could not separate them to build.

    Of course, we could specify the order of different projects to build. Please right-click the solution -> Project Build order..., then choose the set the Project B depends on Project A.

    Any feedback will be expected.

    Best Regards,


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Wednesday, December 4, 2019 5:41 AM