Upgrading your SharePoint 2010 Visual Studio projects and solutions to SharePoint 2013
Author: Tobias Zimmergren
http://www.zimmergren.net | http://www.tozit.com | @zimmergren
Introduction
Recently someone asked me about how to attack the major pain of upgrading their custom coded projects and solution from SharePoint 2010 to SharePoint 2013. Given that question and my experiences thus far I’ll try to pinpoint the most important things to consider when upgrading. There’s TONS of things you need to consider, but we’ll touch on the most fundamental things to consider just to get up and running. After that I’m sure you’ll bump into a few more issues, and then you’re on your way ;-)
Keep your developer tools updated
Visual Studio 2012 Update 1
The first step is to make sure that you’re running the latest version of Visual Studio 2012. As of this writing that means you should be running Visual Studio 2012 and then apply the Visual Studio 2012 Update 1 pack (vsupdate_KB2707250.exe) if it isn’t installed on your system already.
Download Visual Studio 2012 Update 1 here: http://tz.nu/Y28FCd
Visual Studio 2012 Office Developer Tools
The second step is to make sure you’ve got the latest developer tools for SharePoint installed. The package comes as an update in the Web Platform Installer which I urge you to have installed on your dev-box if you for some reason don’t already have it installed.
So, launch the Web Platform Installer and make a quick search for “SharePoint” and you should see the new developer tools there (note that the release date is 2013-02-26, which is the release date for the RTM tools):
[, you should get an upgrade report telling you how things went. Hopefully there’ll be no Errors, only warnings and Messages.
[ the following two lines:
v4.5 15.0
This was true when the developer tools were in Preview/beta. But now when they’re released to RTM you shouldn’t be doing those manual hacks anymore. Trust the tools!
Tip: Some general code updates that may be required
When you deploy artifacts to the SharePointRoot folder in SharePoint 2013 they are now deployed to the /15 folder instead of the older /14 folder. SharePoint 2013 has a much better support for upgrade scenarios than previous versions of SharePoint (2010) which is why we’ve got the double hives. So, if you want to properly upgrade your solution you should also make sure to replace all the paths in your project from:
Path to the Images folder
From the images folder:
/_layouts/images/
To
/_layouts/15/images/
Path to the layouts folder
Make sure to not forget the general layouts path:
/_layouts/
To:
/_layouts/15/
Path to the ControlTemplates folder
Also make sure to replace the following paths:
/_controltemplates/
To:
/_controltemplates/15/
Well you get the general idea here.. Should you find paths pointing to your old 14-hive instead of the new 15-folder, make sure to change the path/url.
Tool-tip
As always, you will not be an efficient developer without the proper tools at hand to make the daily tasks easier.
If you enjoyed using CKS Dev for SharePoint 2010 development, you’ll still be able to enjoy some of that awesomeness by simply installing the CKS Dev tools for SharePoint 2010 on your Visual Studio 2012/SP2013 box. They seem to work fine on Visual Studio 2012 as well – so until there’s a proper update of the tools, you’ll be able to knacker some of your code with the old tools.
Do note that there’s certain features of the CKS Dev that doesn’t work fully, so should you encounter issues with the tool in various scenarios that’ll most likely be because they’re not engineered for Visual Studio 2012 (yet).
Deploy-time
After you’ve done enough tinkering you’ll be ready to rock this baby up on SharePoint 2013.
Enjoy!