In developing an active gen scenario, how can we eliminate/automate the .csp portion of a merge and execute it in an active snippet/code?
The sample merge details always have a manual element that I want to eliminate. I have read the following and some older stuff that is relevant but not answering the question.
https://codesmith.atlassian.net/wiki/spaces/Generator/pages/528957/Merge+Strategies
I work on CodeSmith Generator. You can accomplish this by passing the strategy to RenderToFile like this
<%@ CodeTemplate Language="C#" %>
<%@ Register Name="PreserveRegionsSample" Template="PreserveRegionsSample.cst" %>
<%
var strategy = new CodeSmith.Engine.PreserveRegionsMergeStrategy("^[ \\t]*[ \\s]*\"?(?i:Custom)\"?");
var template = new PreserveRegionsSample();
template.RenderToFile("PreserveRegionsSample.cs", strategy);
%>