Deploying a non-code item to App_Code with a NuGet package

Topics: General
Aug 31, 2012 at 8:17 AM

I'm creating a NuGet package with a structure like this:

- content
  - Templates
    - bar.cs

My problem is that I need the .tt file to be deployed in App_Code if the package is installed in a web site project.

Code files, like bar.cs, are automatically added to the appropriate folder according to the package type (i.e. Templates for a non-web project, and App_Code\Templates for a web project), but other files are not, at least not automatically.

Is there a way I can have the .tt file put into App_Code if necessary?