I have a fairly simple question - how do I generate a script from a CodeSmith template (.cst) without the generated script being run against the target database.
That is, I have a CodeSmith template file that generates CRUD SQL Server stored procedures via the following command
cs.exe "GenerateCrud.csp" -p:TargetDB=mySqlServerDb -p:TargetServer=mySqlServerInstance
...where GenerateCrud.csp invokes a template that runs against the two parameters TargetDB and TargetServer
The requirement is to generate the CRUD script without running the script against the TargetDB and TargetServer. Is there a commandline argument that accomodates this ?
Which template are you using? You'll likely find there's a property inside that csp file, e.g. "AutoExecuteStoredProcedures"
You can change that from the command line, without editing the csp file itself, as you are with the other properties, e.g:
cs.exe "GenerateCrud.csp" -p:AutoExecuteStoredProcedures=false