William
William

Reputation: 772

Visual Studio 2012 Generator Project

I'm looking for a way to make a project build and run as part of the build process in a solution.

Here's what I need:

  1. First it compiles the "Generator Project", and in case of errors, it stops compiling.
  2. Then it runs the "Generator Project", which creates some .cs files in other projects.
  3. Then it compiles the rest of the projects.

I can see two ways of solving this.

While those two solutions work, I was hoping it might be possible to do it some easier/simpler way?

Upvotes: 1

Views: 54

Answers (1)

Leandro
Leandro

Reputation: 1555

It occurs to me that you might solve your problem by using T4 Templates in the generator project (GP), then include the target .cs files generated by the templates as links into the other projects (OTP), and finally add a reference to the GP on each of the OTP so that the custom build order gets honored. I hope it makes sense.

Upvotes: 3

Related Questions