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?
Asked
Active
Viewed 164 times
1 Answers
1
There is no command line switch to cs.exe that allows this. You have to roll your own.
CodeSmith.Engine.Schema.CodeSmithProject
has static method LoadFile(string)
and property PropertySets
.
The CodeSmith.Engine.CodeTemplate.RestorePropertiesFromPropertySet(PropertySet, baseDirectory)
method allows you populate the Properties on a CodeTemplate
instance.
Tie this together with the SDK sample for instantiating and executing a CodeTemplate
https://codesmith.atlassian.net/wiki/display/Generator/Using+the+Generator+SDK.

JJS
- 6,431
- 1
- 54
- 70