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

3 thoughts on “Create SharePoint 2010 Visual Web Parts as Sandboxed Solution with Visual Studio 2010 Power Tools

  1. Pingback: Visual Studio 2010 SharePoint Power Tools - My experiments with SharePoint, Azure and .NET using Visual Studio

  2. Pingback: Create SharePoint 2010 Visual Web Parts as Sandboxed Solution with Visual Studio 2010 Power Tools - My experiments with SharePoint, Azure and .NET using Visual Studio

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.