Q&A

Q. I want to convert a farm solution to a sandboxed solution. How can I ensure that my solution doesn’t use any objects or functions restricted in the sandboxed solution?

A. Visual Studio IntelliSense does show you a trimmed list of classes and functions when developing a sandboxed solution. However, because in your case the code is already written, although IntelliSense will trim the restricted functions and objects, your solution will still compile successfully even when you set it to be deployed as a sandboxed solution. To ensure that you are not using any restricted functionality of the object model, try compiling your code against the version of the Microsoft.SharePoint.dll assembly present in the 14\UserCode\assemblies folder. In this ...

Get Sams Teach Yourself SharePoint® 2010 Development in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.