Copying files to the 12 Hive with VSEWSS Extensions 1.3

26 10 2009

This had me stumped for a while earlier, I had created a Web Part project and wanted to include an image to be deployed to the TEMPLATE\IMAGES directory of the 12 hive.

Originally I added a module to the project but this would then copy the image to a folder in the actual site itself which I didn’t want.

The solution is to use a ‘Template’ –

Right click on the project in Visual Studio and select Add > New Item

Add new template to the project

Select a ‘Template’ and give it a name, this will add a folder in your solution called ‘Templates’ with a text file inside that has the name you gave above.

You can then add the 12 hive TEMPLATES folder structure under here and any files will be copied to the 12 hive when the wsp solution package is installed.

Templates folder within solution

Hope this helps!