A month ago, I have posted a basic guidance on how to create a sandboxed visual web part using Visual Studio 2010 SharePoint Power Tools. A week ago, I had an occasion to explore the sandboxed Visual Web Part in Visual Studio 11 Developer Preview and these are the steps I have followed:
1. I have installed Visual Studio 11 Developer Preview with Microsoft SharePoint Developer Tools features.
2. After a successful installation, I have started opening the Visual Studio 11 and created a SharePoint 2010 Project.
3. I have chosen the Deploy as a sandboxed solution as the trust level of my Visual Web Part.
4. At this point, I have added a Visual Web Part and developed a basic Visual Web Part. One thing I have noticed that templates not applicable for a sandboxed solution are already marked as Farm Solution only.
5. Upon deploying Visual Web Part I have created, I have added it in a SharePoint page. As easy as that! We have successfully implemented a Sandboxed Visual Web Part using Visual Studio 11 Developer Preview.