The tight integration with Visual Studio allows you to fully manage any CodeSmith Generator Project right from Visual Studio! This means you can maintain a high Code Generation presence right within Visual Studio and not have to switch applications to run code generation.
Creating a new CodeSmith Generator Project
...
When generating files to a Visual Studio Project, you may want to set the Build Action of a generated file to a specific value. For example, when generating an EDMX file, you always want to set the Build Action to EntityDeploy.
...
- If your template is a sub template and it generates the physical content that the build action should be set on, then you would need to just call the CodeTemplate's RegisterOutput method as shown above.
- If you are calling RenderToFile on a template, then you would need to use a RenderToFile overload that takes an OutputFile. Please see the API documentation for more information.
...