The Template producer inherits from the CodeDomProducer
(the one that generates the BOM). This allows the template producer to have some useful methods like AddToGeneratedFiles
that adds the file to Visual Studio target project, or AddCompilationReferences
which adds references to the target project.
The producer also inherits some configuration options like Target Project Layout
of type CodeFluent.Model.Design.TargetProjectLayoutOptions
[Flags]
public enum TargetProjectLayoutOptions
{
None = 0x0,
[Description("Update All")]
Update = UpdateReferences | UpdateItems,
[Description("Update References")]
UpdateReferences = 0x1,
[Description("Update Items")]
UpdateItems = 0x2,
[Description("Do Not Remove Existing Items")]
DontRemove = 0x4,
Default = Update,
}
As you can see this allows you to not update project references. So to answer your question, your producer configuration should look like
<cf:producer name="Template" typeName="CodeFluent.Producers.CodeDom.TemplateProducer, CodeFluent.Producers.CodeDom">
<cf:configuration cfx:targetProjectLayout="UpdateItems" [other options] />
</cf:producer>
Happy templating :)