Question

I'm upgrading one of our applications at work at I've run into a snag. We have some "custom" languages, which are handled via a custom build rule on the file. However, there are other projects that rely on these files being generated before they can properly build, but project with the "custom" generated files needs other projects before it can build. The super jenky solution I have is to build the generated code projects, they fail, but generate the necessary code, then build the dependencies.

What I want to do is run all of the custom build rules before actually build any project in a solution. Is there a way to do this?

Thanks!

Was it helpful?

Solution

The usual cause is a project that contains unrelated files. E.g. project A contains files on which project B depends, and other files that depend on B. Split A into A1 and A2. Move the files on which B depends into A1. Move the files which depend on B into A2. Set the dependency order to A1 <- B <- A2.

A1 now builds since it has no dependencies on B. B builds since its dependencies are satisfied by A1. A2 builds because its dependencies are satisfied by B.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top