0

I have a two projects in my visual studio solution. One of them generates source code files for the other, and I want to set up the build events so that this is done automatically when building the child project.

I have a pre-build event command in the child project which executes the parent project. This works as intended, and correctly generates the source code in the child. At this point, the source code is complete and can compile without errors.

However, when I try to build the child project visual studio stops with an error, saying that it cannot find the generated source code files. When pre-build completes though, the files exist and the code compiles without errors.

How do I ensure that pre-build has completed before visual studio checks for errors and compiles?

I’m using VS 2019 if it matters.

Groger
  • 532
  • 3
  • 15

0 Answers0