1

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 ?

1 Answer 1

0

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

3
  • As per the requirement i want the JavaScript files to be in Virtual Directories - Resources folder only. Jun 14, 2011 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: blog.pentalogic.net/2010/09/…
    – James Love
    Jun 14, 2011 at 11:44
  • Worked !!!!! Awesome post Thanks a lot for the quick reply Jun 14, 2011 at 12:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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