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

How can I deploy SandBox Solution from Visual Studio with images on the Server ?

When I trying to deploy it, I am getting the following errors.

1). The Project Item "Images" cannot be deployed through a Package in a Sandboxed Solution.

2). The deployment type "TemplateFile" of file "myImage.jpg" in Project Item "Images" is not compatible with a Package in a Sandboxed Solution.

Please help me to deploy it.

share|improve this question

You can't deploy anything to any mapped folders in Sandboxed solutions.

A Sandboxed solution cannot place physical files in the LAYOUTS virtual directory - it's just one of their limitations.

What you'll need to do is to add your images to a Module SPI folder in Visual Studio, and have the Solution deploy the module (and the files contained within) to a Document Library in the target site collection.

share|improve this answer

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.