Month: June 2011

Create SharePoint 2010 Visual Web Parts as Sandboxed Solution with Visual Studio 2010 Power Tools

Home | Sandbox Solutions | Create SharePoint 2010 Visual Web Parts as Sandboxed Solution with Visual Studio 2010 Power Tools

This article will focus on how to create SharePoint 2010 Visual Web Parts as Sandboxed Solution. In the initial release of SP 2010, the Sandboxed Solution Architecture had restriction in terms of supporting Visual Web Parts in the Sandboxed environment. This has been fixed by the recent release of Visual Studio Power Tools for SharePoint 2010, which helps to create Visual Web Parts for Sandboxed environment.

Here are the steps below :-

File –> New –> Project –> Empty SharePoint Project

image

 

Then choose ‘ Deploy as Sandboxed Solution’.

image

Click ‘Finish’.

Add –> New Item –> Visual Web Part (Sandboxed)

image

Implement some arbitrary functionality inside the web part.

image

Right click on Solution Explorer –> Deploy

Now you can see the Sandboxed Solution available in the Solutions Gallery.

image

Caveat

Event though the Visual Studio Power Tools supports Sandboxed Solution, there are some caveats/limitations around that.  The following are not supported.

1. SharePoint Web Controls and some advanced ASP.NET controls

2. Use of “<@ Assembly Src=” directive is not supported

3. Java Script debugging is not supported in Visual Studio.

 Subscribe to my blog