Deploying files under the TEMPLATES directory in a SharePoint VSeWSS project

A common thing you might want to include in a SharePoint solution is to include various files that are deployed to the \Template directory.  These might be images (\Template\Images) or Aspx pages that you would like put in a folder in the Layouts directory.

Typically to do this you would include in your WSP Solution manifest file a <TemplateFile>  node that deploys your file there. 

The VSeWSS toolkit makes building Solutions easy & helps with deploying your Template files in a pretty nifty way.

To deploy a file to any location under the \Template directory do the following:

Add a new project item to your VSeWSS project and pick the Template item.


You will end up with your file under a folder called Templates


This will end up deploying your file to the root of the \Template directory.  To change where it is deployed to simply create the folder structure you wish below the Template folder in your project and drag your file into the appropriate folder.



This will result in your ASPX file being deployed to the \Template\LAYOUTS\MyProject\ directory.  It builds the manifest xml for you like so:


This will allow you to deploy the majority of your projects supporting assets.

If anyone has comments or suggestions on VSeWSS please comment below.  We are listening!!!


Comments (6)
  1. Joel says:

    I installed the VSeWSSCTP 1.1 and I’m working on a layouts ASP.Net app.  When I import an existing aspx page, none of the magic seems to be tying the designer-dropped code to the partial code-behind file.  Am I missing something?  Thanks for your help!  Great work on the VSeWSS.  Feel free to drop me a line at jcade (at)


  2. chjohn says:

    Hi Joel,

    The behaviour you seeing is how it currently works.  

    We are looking at how this can be made better so that ASP.Net magic works better in these cases.  However, this would be in a future release.



  3. Body: Over the past few weeks our team has been working on creating a user guide and sample code for

  4. Paul Matthews says:

    Hi Joel

    Thanks for the post.  I am looking for a solution to deploy my custom login.aspx page into _Layouts.

    From the above comment the method described in the post will only work for static aspx pages and therefore would not work for me in this situation.  Am I correct in this and if so could you suggest any way that I could deploy application pages, without manually copying.

    Thanks in advance


  5. videoizle says:

    thank you great article. Save my files.

Comments are closed.

Skip to main content