SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 ?

share|improve this question
up vote 0 down vote accepted

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

share|improve this answer
As per the requirement i want the JavaScript files to be in Virtual Directories - Resources folder only. – Monica Jagani Jun 14 '11 at 11:37
So, to clarify, you need to add class resources in visual studio 2010? If so, here's how to set the deployment type of a module in VS2010 to ClassResource:… – James Love Jun 14 '11 at 11:44
Worked !!!!! Awesome post Thanks a lot for the quick reply – Monica Jagani Jun 14 '11 at 12:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.