SharePoint On-Premise and Online Development with CloudShare and Visual Studio 11 Beta

Apr 17, 2012 6:09:36 AM / by Juan Carlos

I have spent my last few posts on the CloudShare blog focusing on how to develop specific SharePoint artifacts to both SharePoint Online and On-Premise using Visual Studio 11 Beta (Note: You can review prior articles by accessing my profile page).

In this article, I will give a brief summary of new SharePoint development features available in Visual Studio 11 Beta (VS 11 Beta). In future articles, I will show you in greater detail the rest of the goodies that come with the newest IDE version.

  • First, you need to access your CloudShare account and start one of your available environments.

  • Once your environment is ready, open VS 11 Beta. It’s completely gray with a little bit of METRO Style :). Create a new project by clicking on “File -> New Project"
  • In the “New Project” window, go to the SharePoint section under Visual C# project category. Here you can see the first changes as compared with Visual Studio 2010 (VS 2010) - there are fewer SharePoint 2010 Project Templates, which is very cool because unnecessary project templates have been removed. As you can see in the screen shot below, there are 5 templates (versus 12 project templates in VS 10) in VS 11 Beta for SharePoint 2010 development:
    • SharePoint 2010 Project (formerly “Empty SharePoint Project” template in VS 2010).
    • SharePoint 2010 Silverlight Web Part (this is a project template we hadn’t had in VS 2010).
    • SharePoint 2010 Visual Web Part (formerly “Visual Web Part” template in VS 2010).
    • Import SharePoint 2010 Solution Package (formerly “Import SharePoint Solution Page” template in VS 2010).
    • Import Reusable SharePoint 2010 Workflow (formerly “Import Reusable Workflow” template in VS 2010)
  • The following table summarizes available SharePoint project templates in both IDE versions and identifies which are equivalent:
  • Select the “SharePoint 2010 Project” template. Provide a name for the project and the solution and click “Ok”.
  • In the “SharePoint Customization Wizard” window specify your local SharePoint 2010 site for testing purposes, leave the deployment type as “Deploy as a sandboxed solution” and click “Finish"
  • As always, once the project creation process ends, you will see the complete project structure for your SharePoint solution in VS 11 Beta Solution Explorer. Select the name of the project, right click with your mouse and select “Add -> Add New Item…” As you can see in the “Add New Item…” window, there are a few more changes:
    • A few new SharePoint Project Items (SPI), like Silverlight Web Part and Site Column
    • SPI as related to farm solutions now marked with, “Farm Solution Only”
  • Let’s see some of the new SPI templates we have in VS 11 Beta:
    • Visual Web Part SPI: Select the “Visual Web Part” SPI template, add a name to it and press the “Add” button. Once It’s added, you’ll see the it in VS 11 Beta solution explorer:
  • Some things to note:
    • Visual Web Part template has been rewritten (with the Page.LoadControl() it’s not needed anymore).
    • It works in the Sandbox J.
    • It inherits from WebPart class.
  • Content Type SPI, This is really cool because it allows you to configure a SharePoint content type by means of a visual designer where you can choose existing site columns or add new ones defined in your current project.
  • List SPI, allows you to create a list schema and a list instance with a new visual designer, similar to the new Content Type SPI. I will cover this new designer in future posts in more detail. For now, just enjoy a nice screen shot:
  • In addition to these new project and SPI templates, there are other improvements:
    • There is now a “Publish” option available in your “Build” options, which allows you to publish your solutions to the following locations: File System, Remote Server, and/or SharePoint Online.

    • You can use VS 11 Beta in your current CloudShare development environment for SharePoint 2010. This means you can develop SharePoint 2010 artifacts in VS 11 Beta since:
    • SharePoint 2010 solution structure remains unchanged.
    • It still compiles to .NET Framework 3.5.
    • You can use source control capabilities.

And that covers VS 11 Beta improvements for SharePoint 2010 and SharePoint Online development. Happy CloudSharing :)!

Topics: SharePoint, CloudShare

Subscribe to Email Updates