However, the easiest way to do it is by using a tool that manages creation of the WSP file for you.
When using WSPBuilder, files under the 12 folder in the WSPBuilder project are automatically placed on the file system in the corresponding location. For example, 12\TEMPLATE\LAYOUTS\Custom\Company.css would be automatically deployed to "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\Custom\Company.css".
To reference the CSS and/or JavaScript from a master page, use _layouts for the file path. This maps to "%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS" on the file system.
"Globally deployed" only applies to WSP files that don't have web controls and web parts in them. These cannot be "Globally deployed", because the web.config of the web application you choose to deploy to is changed, i.e. entries are inserted in order to register your .dll's containing web controls and web parts.
Best Answer
If you're writing the manifest.xml file yourself, use the TemplateFiles element for CSS and JS files. For example:
However, the easiest way to do it is by using a tool that manages creation of the WSP file for you.
When using WSPBuilder, files under the 12 folder in the WSPBuilder project are automatically placed on the file system in the corresponding location. For example,
12\TEMPLATE\LAYOUTS\Custom\Company.css
would be automatically deployed to"%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\Custom\Company.css"
.To reference the CSS and/or JavaScript from a master page, use
_layouts
for the file path. This maps to"%CommonProgramFiles%\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS"
on the file system.Based on the example above: