SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

I am currently working with SharePoint Online(Office 365), so that i am creating the sandbox solution for creating custom web-parts. Here problem is that i want to use Ajax Control Toolkit(dll) and other dll and resource(.js,Images,.css) files.

Is it Possible to use dll and Resource Files in sandbox solution (Office 365) ?

share|improve this question

You can add DLL files as usual. Just run

Install-Package AjaxControlToolkit

to install the package from NuGet.
Then reference it as Anders Rask explains here: adding reference dll in package.

For resources you could just reference them in a Module (Elements.xml). As far as I know they will be unghosted because of file system restrictions in sandboxed solution. But this should put them at root:

<Elements xmlns="">
  <Module Name="Assets">
    <File Path="Assets\mystuff.js" Url="mystuff.js" />

(Module called Assets).

To use a pure DLL you need to embed your resources within the DLL file and use a Feature Event Receiver to add them to SharePoint.

Here is one solution for embedding the resource: .
But you could probably use any way you like, even generate some classes with Base64 strings (ugh).

Then you use any FileCollection method which support bytes, such as SPFileCollection.Add Method (String, Byte[], SPUser, SPUser, DateTime, DateTime)

share|improve this answer
For js file its correct but it not work for DLL – Vikalp Kapadiya Sep 29 '12 at 4:46
Oh my, I completely missed that. But I think you can actually do this with a pure DLL as well – eirikb Sep 29 '12 at 7:03

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.