Windows Explorer | Managing a CodeSmith Project right from Windows Explorer is simple and doesn't require you to use CodeSmith Studio to manage a project. Options are available through the right-click context menu your CodeSmith Project file (.csp). The menu options include: - Generate Outputs
- Manage Outputs
- Add Outputs
|
Command-Line | You can Generate Outputs of a CodeSmith Project in the command line by using the CodeSmith Console application. You would simply call: cs MyCodeSmithProject.csp |
Visual Studio | The tight integration with Visual Studio allows you to fully manage any CodeSmith Project right from Visual Studio. To manage a CodeSmith Project, you can use the Right-Click context menu of a CodeSmith Project file from the Solution Explorer window. The menu options include: - Generate Outputs
- Manage Outputs
- Add Outputs
- Output OptionsYou can use ActiveGeneration quite easily in your Visual Studio projects now, simply by specifying the BuildAction of your CodeSmith Project. Setting the BuildAction = "Generate" in the properties of you CodeSmith Project file in the Solution Explorer will cause your entire build process to occur prior to your project building.
|
CodeSmith Studio | To manage a CodeSmith Project, you can use the Right-Click context menu of a CodeSmith Project file from the CodeSmith's Template Explorer window. The menu options include: - Generate Outputs
- Manage Outputs
- Add Outputs
|
MSBuild | CodeSmith projects can be manually expected from your MSBuild project file by executing: <CodeSmith ProjectFile="MyProject.csp" />
When you set the BuildAction to Generate in Visual Studio, you're actually using the CodeSmithGenerate Target, located in: Program Files \MSBuild\CodeSmith\CodeSmith.targets * *You can import this target in your Visual Studio Projects by using the Import tag. <Import Project="$(MSBuildExtensionsPath)\CodeSmith\CodeSmith.targets" />
Using a CodeSmith Generator Project from MSBuild |