SharePoint developers who have developed MOSS 2007 solutions using Visual Studio 2008 definitely know how awesome Visual Studio 2010 was for SharePoint 2010 development. Such features as Visual Web Parts, the new project and item templates, and the ability to debug and deploy solutions right from the Visual Studio 2010 interface made developers’ lives easier all across the globe. Microsoft didn’t disappoint with the latest release – fresh and shiny Visual Studio 2012 includes a number of incremental improvements, as well as, new and exciting SharePoint 2010 development features. In this post, I will point out some of the most important ones.
Sandboxed Solution Improvements
Visual Web Parts can now be used for sandboxed projects, not just farm projects, like it was in Visual Studio 2010. When you create a new Visual Web Part project, you are presented with the familiar dialog where you can choose whether the solution should be deployed as a sandboxed or a farm solution.
When developing sandboxed solutions, Visual Studio IntelliSense now only displays APIs that are available in the sandboxed solutions. This is a welcomed improvement and will save seasoned developers some time, as well as, help beginners get familiar with sandboxed solution limitations more quickly.
Increase business process efficiency and collaboration with Microsoft SharePoint
If you attempt to compile code that contains farm-only APIs, you will see a compiler error. As with Visual Studio 2010, you no longer need to deploy your web part and run it in SharePoint before you can see the error.
New and Improved Project & Item Templates
There’s a new project template for Silverlight Web Parts. If you thought it couldn’t get any easier to develop and deploy Silverlight solutions in Visual Studio 2010, then think again. It’s now a more streamlined and convenient process. When the Silverlight Web Part project is created, it allows you to create a new Silverlight application or add an existing one, in addition to the web part for this Silverlight application.
There is also a new project item template for site columns (or fields), which is helpful.
Other SharePoint project and item templates have changed, and lots of the project templates in Visual Studio 2010 became project item templates in Visual Studio 2012. The hierarchy makes more sense now and promotes best practices of the SharePoint 2010 development.
List of all SharePoint 2010 Project Templates in Visual Studio 2012:
SharePoint 2010 Project
SharePoint 2010 Silverlight Web Part
SharePoint 2010 Visual Web Part
Import SharePoint 2010 Solution Package
Import Reusable SharePoint 2010 Workflow
List of all SharePoint 2010 Project Item Templates in Visual Studio 2012:
Silverlight Web Part
Visual Web Part
Sequential Workflow (Farm Solution only)
State Machine Workflow (Farm Solution only)
Business Data Connectivity Model (Farm Solution only)
Application Page (Farm Solution only)
Site Definition (Farm Solution only)
User Control (Farm Solution only)
Notice that project item templates show you whether the item is only available for farm solutions. More information about these project and item templates is available on this MSDN page.
New Designers for Lists and Content Types
The new designer is very handy and helps you visually set up new Lists and Content Types. For example, when a new list project item is added, the wizard first asks if you want to create a customizable or non-customizable list and which existing list template it should be based on. Once created, it then presents you with visual tools to manage its columns, views, and list properties.
Visual Studio 2010 already allowed you to deploy solutions to local SharePoint sites, but Visual Studio 2012 goes a step further and allows you to publish SharePoint solutions to remote SharePoint sites. Unfortunately, this functionality is only available for sandboxed solutions. You can also publish solution packages to the local file system.
Notice the difference between deploying and publishing a SharePoint solution package:
Deploying allows you to configure the deployment steps, such as recycling an application pool, activating the solution after deployment, etc.
Publishing does not allow you to configure any deployment steps; it merely uploads a sandboxed SharePoint solution package to a remote SharePoint site.
Visual Studio 2012 offers a solid improvement of the existing SharePoint 2010 development features, and adds a number of new ones. Support for MOSS 2007 solutions has been dropped, and support for new SharePoint 2013 solutions can be added by downloading and installing Office Developer Tools for Visual Studio 2012 from the Office and SharePoint Development Center.
If you have Visual Studio 2012 questions and/or looking for more great tips, please send us a tweet @CrederaMSFT. You can also check out our other blogs on Visual Studio: