Recently I tried to convert a SharePoint solution in visual studio 2010 to Visual Studio 2012, but it gave me errors like:
"The primary reference "Microsoft.SharePoint" could not be resolved because it has an indirect dependency on the .NET Framework assembly "mscorlib, Version=220.127.116.11, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "18.104.22.168" than the version "22.214.171.124" in the current target framework."
You can refer to below steps if you want to convert your SharePoint 2010 solution (created with visual studio 2008 or 2010) to visual studio 2012 for SharePoint 2013:
- Open your visual studio .csproj file in notepad or visual studio and change the value of tag "TargetFrameworkVersion" to 4.5
- Add a new tag just below the one you modified in above step as:
- You will also need to change the SharePoint Product version property of your Package file from 14.0 to 15.0 as shown below.
- In your aspx pages and code files, where you are referencing any image from Layouts folder, you need to append "/15" as:
/_Layouts/15/<your image path>