Question

In SharePoint 2010 , using visual studio 2010 : i have bin / web application deployment. i want to add java script file under Virtual Directories\/wpresources//

I cannot use the Resources mapped folder as it points to {SharePoint}/Resources ie 14 hive/ Resources folder.

Can i know how to achieve this ?

Was it helpful?

Solution

Real Answer, first version of this answer is an alternative solution, see comments for clarification

Set the Deployment Type to Class Resource for the module. See here for an example.

Alternative Answer:

You could have javascript files live in the LAYOUTS folder if possible, they'll be the most accessible there.

Add a mapped folder for LAYOUTS, add in a folder for the name of your project if you want (if it doesn't already do so) and then access it via /_layouts/YourProjectName/file.js

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top