Some work had to be done!
Before I get started, it’s worthwhile understanding how we have things set-up at Collaboris. Our development team still use Visual Studio 2010 and TFS 2010. We would love to make the move to Visual Studio 2012 – but there's no time and no compelling reasons to do so at the moment. DocRead currently runs on multiple versions of SharePoint as follows :
We also use Hyper V development machines.
Please also note - we do not intend to use any of the new ‘App’ functionality in SharePoint 2013. In the first version we are simply porting our 2007 / 2010 solution to work on 2013, which means ‘full fat’ (not sandboxed) Farm solutions.
If you take a SharePoint 2010 farm solution (as a WSP) and install it into 2013, it stands a really good chance of working. This is possible because Microsoft also deploys the 14 hive and all of the binaries needed to support 2010. When you deploy the solution if the Manifest.xml contains 'SharePointVersion="14.0"' then this will deploy layouts, features and so on to the older 14.0 hive. If it states 'SharePointVersion="15.0"' it will deploy to the new hive. This is pretty useful if you want to just 'get it working' on 2013 and then perhaps migrate your application over to SharePoint 2013 at later date. If - like us - you want to fully support SharePoint 2013 and compile against .Net 4.0 you need to keep reading. After all, there's some tasty features in 2013 you may want to take advantage of ;)
There's a lot of steps to getting this all up and running so I wrote it up in a separate blog post called 'How to support multiple versions of SharePoint in a single Visual Studio solution'. I recommend you read that then come back here to carry on.
The first thing you need to do is change your 'SharePoint Product Version' to "15.0". Doing this causes your solution to be treated as a SharePoint 2013 solution and will deploy all of the components to the correct locations.
Fernando Lugão Veltem edited Original. Comment: added toc and tags