Steps for migrating visual studio solution from SharePoint 2010 to SharePoint 2013 – Visual Webpart

  • Copy that solution from SharePoint 2010 Visual Studio folder to your SWharePoint 2013 file system .
  • Open with Microsoft visual studio 2012.

R1

  • After opening it u will get this screen, because in previous solution we had given url of sharepoint 2010 site .
  •  Click on ok.
  • Then you will get migration report close that report .
  • And for solving above issue, change url of this solution give url of your Sharepoint  2013 site.

R0

  • Then save And deploy, Check your webpart in that site.

When you will migrate visual webpart so you may face some problem:

  • Because while upgrading solution it gave you error some project item such as visual webpart may not upgrade correctly .

R2

  • So when you will go for the migration of visual webpart all the steps will be the same.

But some points where we need to focus in sp2013  are:

  •  .NET framework should be 4.5

R5

  •  In the Reference properties version should be 15.0

R6

  • in the csproj file. In the SP 2013 project there is a <TargetOfficeVersion>15.0</TargetOfficeVersion> property that was not present in the SP 2010 project.
  • These three changes will happen automatically by upgrading solution and if not please do these changes manually.
  • So after checking these changes right click on solution and deploy it .
  • When you try to open your site will get this error msg.

R7

  • For resolving it go to visual webpart .cs file and open it

R8

  • Add this /15 in .cs file, now save it,and deploy it.
  • Your visual webpart will be working fine.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s