Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
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.

...

  1. If your template is a sub template and it generates the physical content that the build action should be set on. Then , then you would need to just call the CodeTemplate's RegisterOutput method as shown above.
  2. 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.

...