Windows Phone 7.x, 8.0 and 8.1
3 major versions of Windows Phone exist since April: 7.x, 8 and 8.1.
The 8.1 version allows among others to create ‘classic’ Windows Phone 8.1 applications called 8.1 – Silverlight (SL) and also Universal applications that can be shared between Windows 8.1 and Windows Phone 8.1.
Having common codebase was already partially possible with the PCL (Portable Class Libraries). The compiled assembly can be used in Windows Phone 7.x, WP8 and Windows 8 project for example.
With Universals Apps the UI code can also be shared.
Visual Studio 2013 allows for creating PCL compatible with WP8, W8, WP8.1, W8.1 which can be used in classic Windows Phone applications and Windows 8.x with Universal Apps projects.
But Visual Studio 2013 is no longer compatible with WP7.x.
Windows Phone 7.x still represents 19% of Windows Phone users in April 2014 (click on the image for the full survey of adduplex).
So you need to make a choice.
If you want to create an application for Windows Phone 7.x you need to use Visual Studio 2012. The PCL will be compatible WP7 and WP8, as well as the Windows Phone 7.x application.
The diagram below shows the possibilities of each Visual Studio version.
Depending on how the PCLwas built, your code may or may not be shared between a Windows Phone 7 project and a Windows Phone 8.1 project.