CodeSmith project files (csp) allow multiple outputs defined and run together. I would like to re-generate only a single output from the command line the way the UI allows. Is there a command line switch to cs.exe I'm missing that will allow me to target a single propertySet in the csp file?
There is no command line switch to cs.exe that allows this. You have to roll your own.
CodeSmith.Engine.Schema.CodeSmithProjecthas static methodLoadFile(string)and propertyPropertySets.The
CodeSmith.Engine.CodeTemplate.RestorePropertiesFromPropertySet(PropertySet, baseDirectory)method allows you populate the Properties on aCodeTemplateinstance.Tie this together with the SDK sample for instantiating and executing a
CodeTemplatehttps://codesmith.atlassian.net/wiki/display/Generator/Using+the+Generator+SDK.