Wednesday 6 July 2011

Error : Sandboxed Solution deploy

I created a sandbox solution. While working on the solution I added a Sharepoint mapped image folder to the solution. In visual studio when I clicked deploy of the project I encountered the following error.
The deployment type "TemplateFile" of file "ALLMTGS.GIF" in Project Item "Images" is not compatible with a Package in a Sandboxed Solution.
The Project Item "Images" cannot be deployed through a Package in a Sandboxed Solution.


Solved:
The cause of the problem was that, I created a Sandboxed solution. A Sandboxed solution does not support disk operations. I changed the solution type from Sandboxed to farm solution and the deployment worked fine. Below are the steps I followed in visual studio to change the sandboxed solution to a farm solution.
  1. In the solution explorer, select the sharepoint project that is to be deployed
  2. With the selection on the project, navigate to the properties window (press F4)
  3. Change the value of the property 'Sandboxed Solution' to 'false'
  4. An alert will be displayed asking if you have farm administrator previleges. Click 'OK'

No comments:

Post a Comment