Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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
add comment

1 Answer

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="http://schemas.microsoft.com/sharepoint/">
  <Module Name="Assets">
    <File Path="Assets\mystuff.js" Url="mystuff.js" />
  </Module>
</Elements>

(Module called Assets).

Update:
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: http://blogs.adatis.co.uk/blogs/martynbullerwell/archive/2007/11/30/embedding-images-into-dll-s.aspx .
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
1  
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
add comment

Your Answer

 
discard

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.