Compile for Sandbox
SharePoint 2010 Sandbox solutions use a subset of the SharePoint assembly functionality. From the project context menu you can now compile your project specifically against the Sandbox assembly. Invoking this function automatically replaces the SharePoint assembly
reference with the UserCode version, invokes build for that project and then finally reverts the references back.
- Right mouse on the Site node.
- From the context menu select the 'Compile for Sandbox' menu option.
- The assembly will now be automatically switched for the Sandbox version, the project then builds and reverts back to the full SharePoint assembly.