Search This Blog

Monday 9 September 2013

upgraded from a VS 2010 project to VS 2013


I was able to get my solution upgraded from a 2010 project to 2013 using the following. Note that this will update your solution to use the new 2013 API. It is possible to update just the project file but still run in 2010 mode.

First edit your .csproj file (for c#).

Modify the target framework to this: <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>

Add this a node for the office version, I put mine directly below the TargetFrameworkVersion tag <TargetOfficeVersion>15.0</TargetOfficeVersion>

Update references

Reload the project and update your referenced assemblies. If you haven't specified a specific version they should already be referencing the v15 (SharePoint 2013) assemblies.

Do a find replace for 14.0.0.0 to 15.0.0.0. This updates any references on your pages, layouts, and master pages to the v15 assemblies.

Change calls

Change any calls to SPUtility.GetGenericSetupPath() to SPUtility.GetVersionedGenericSetupPath()

Check each file to do a check for any hive references. You'll need to add a /15/ to these. EG: _layouts/ to _layouts/15/

Open the package "folder" in visual studio then update the properties for that package to use version 15.

Clean up

Finally do a compile clean up any missed items. Deploy your solution and make sure to test thoroughly.

No comments:

Post a Comment