How do I migrate Sharepoint Visual Web Part from Sharepoint 2010 to Sharepoint 2013.
I know I should migrate all list, and whats more. How upgrade the C# code to work with Sharepoint 2013. Please help.
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
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:
Add this a node for the office version, I put mine directly below the TargetFrameworkVersion tag
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
126.96.36.199 to 188.8.131.52. This updates any references on your pages, layouts, and master pages to the v15 assemblies.
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.
Finally do a compile clean up any missed items. Deploy your solution and make sure to test thoroughly.
Also Along with the above solution check out this link
and also this link which has a nice powershell script that fixes the target framework and server versions