Packaging single SharePoint 2013 project with Mavention Package Single Project

The 'Mavention Package SharePoint Project' extension highlighted in Visual Studio 2012 RC Extension Manager
Visual Studio 2012 RC ships with the new SharePoint Development Tools. Unfortunately, once you pass the ‘F5’ experience and start working on some project you will notice that it’s not possible to just package your SharePoint 2013 project.

Update 22/7

It turns out that I was wrong and that it is possible to just package SharePoint 2013 project after all. You can do this from the Build menu by clicking the Publish… option.

03

In the Publish dialog window you then choose Publish to file system, you choose the location and after you click the Publish button the Solution Package will be created in the location of your choice.

04

I want to thank Mike Morton of the Microsoft’s DEVDIV team for pointing this feature out.

Visual Studio 2012 RC SharePoint Developer Tools

Visual Studio SharePoint Developer Tools have been a great productivity enhancement since the moment they have been released. The newest version of the tools provided with Visual Studio 2012 RC contains numerous improvements: not only for leveraging the new developer capabilities of SharePoint 2013 but also to make things easier when working with SharePoint Solutions. Unfortunately among those new cool features there are a few inconveniences, one of which is the inability of just creating a Solution Package of a single SharePoint 2013 Project.

Inconvenient inability to package a single SharePoint 2013 project

Imagine the following scenario: you’re working on a SharePoint project and you want to test the Feature upgrade process. What you need for that, is to build the Solution Package, update it and then trigger the Feature upgrade process. Unfortunately by default Visual Studio 2012 RC SharePoint Developer Tools allow you to either Build or Deploy your SharePoint project. Building a SharePoint 2013 only creates assemblies and Deploying a SharePoint project uses the retract/add approach which is not what you want while testing the update scenario. So what can you do to get the job done?

Extending Visual Studio 2012 RC SharePoint Developer Tools

One of the greatest features of the Visual Studio SharePoint Developer Tools since the day they were released is their support for extensibility. Whenever you’re missing something or something is not working the way you want it to, you can fairly easily create your own extension and add new functionality to the existing SharePoint Developer Tools.

The extensibility capabilities have been introduced with the Visual Studio 2010 version of the tools and are still available in Visual Studio 2012 RC. Once again, if you’re interested in building your own extensions, the only thing that you need is the Visual Studio SDK. Other than that you can use your existing experience as the basic concepts for building SharePoint Developer Tools extensions haven’t changed at all.

Packaging a single SharePoint 2013 project with the Mavention Package SharePoint Project extension

The Mavention Package SharePoint Project extension is an extension for the Visual Studio 2012 RC SharePoint Developer Tools that allows you to create a Solution Package of your SharePoint 2013 project. After you installed the extension and opened your SharePoint 2013 project, all you need to do is to click right button on the project, and from the context menu click the Package <project> option.

The ‘Package project’ menu option highlighted in the context menu of a SharePoint 2013 project in Visual Studio 2012 RC

After that the standard packaging process of the Visual Studio 2012 RC SharePoint Developer Tools will be triggered which will even build the code for you if necessary!

SharePoint 2013 Project packaged

Summary

Visual Studio 2012 RC provides the new developer tools for SharePoint 2013. Aside from numerous improvements it contains a few inconveniences, one of which is the inability to just package a single SharePoint 2013 project. Using the Mavention Package SharePoint Project extension you can easily just create a package for a single SharePoint 2013 project and test scenarios such as upgrading Solutions and Features.

Download: Mavention Package SharePoint Project from Visual Studio Gallery

Comments

comments powered by Disqus