Add Project Reference to the OutputProject

Jan 28, 2011 at 1:37 PM



I'm using a .tt to generate classes into a different project. These classes use a helperclass in yet another project. I would like my .tt to add a reference to that helper-project but I can't see to figure out how to do this. Am I missing an option or is this not possible?

part of the .tt file:

public class MyTemplate : Template 
	public override string TransformText()
		// Add needed references (for the output project), THIS WORKS

		// Add reference to different project in the solution where the output project resides, THIS FAILS

		// THIS WORKS but when you switch the solution from Debug to Release, the reference doesn't update

		// insert the rest of the code here