SharePoint, Visual Studio 2012 and Team Foundation Server 2012 and Unicorns

I’ve been building out demonstrations for my Application Lifecycle Management workshop at the European SharePoint Conference in Copenhagen next week that I’m running with my good mate Randy Williams (he’s the one always wearing shiny silver pants).

I wanted to be able to show Team Foundation Server 2012 continuous integration story with every build packaging SharePoint 2013 Apps, SharePoint 2013 Solution Packages (sandboxed or farm) and SharePoint 2010 Solution Packages (sandboxed or farm). And adding some Code Analysis with SPDisposeCheck for good measure.

So here’s the summary:

  • TFS 2012 server and Visual Studio 2012 desktop software work great together with next next next install approach on Windows Server 2008 R2 (not bothering learning Server 2012 right now…miss my start bar on servers)
  • You can install Visual Studio 2012 on both a SharePoint 2010 farm server or a SharePoint 2013 farm server and create Solution Packages fine.
  • Obviously you can create Apps on SharePoint 2013 farm server too in Visual Studio 2012.
  • I can get all of the projects in Source Control fine
  • I can get SharePoint 2013 Solution packages drops working as part of build
  • I can get the SharePoint 2013 Apps packages drops working as part of build
  • I can get SharePoint 2010 Solution packages drops working as part of build

So here’s the hard work:

  • Both
    • You will need the Office Developer Tools Preview 2 for Visual Studio 2012 on your SharePoint development environments
    • You will need SPDisposeChecker installed on your SharePoint development environments
    • You’ll need this installed on your Visual Studio 2012 SharePoint environments for SPDisposeCheck Code Analysis to work.
  • SharePoint 2013
    • You need to install the SharePoint Server 2013 Client Components SDK on the TFS 2012 server for it to build the SharePoint 2013 Visual Studio Projects
      • OR you could break all known godly ALM laws known to man and install SharePoint 2013 and install Visual Studio 2012 on the TFS 2012 server and burn in hell for eternity. This won’t solve your problem if you have SharePoint 2013 and 2010 to build as you can’t install both on one server…and no you don’t get both sets of assemblies in SharePoint 2013…it uses assembly redirects for SharePoint 2010 site collections running on SharePoint 2013 farm. It does have a separate 14 folder next to 15 folder though… JUST DON’T DO IT!
    • You will need to use the OfficeToolsAppTemplate.xaml Build templates in Visual Studio 2012, that literally came out last week.
  • SharePoint 2010
    • You will need to install the .NET 3.5.1 Features on the TFS 2012 server, it will only install .NET 4.0 Framework by default on top of Windows Server 2008 R2.
    • You will need to run the .NET4.0 version of aspnet_regiis.exe –I to get .NET 4.0 as IIS default as the previous step breaks TFS 2012.
    • You can’t follow these MSDN steps we used to follow for TFS 2010 because the newer SharePoint 2013 assemblies are already in that location due to the SharePoint Server 2013 Client Components SDK and also things to collect in this script are in different places in Visual Studio 2012.
      • so I have built a modified script here to handle the multiple versions of SharePoint assemblies going on

Current State

  • SPDisposeCheck doesn’t seem to throw errors on SharePoint 2013 Solution projects Sad smile
  • SharePoint 2013 tools for Visual Studio 2012 are still not RTM Winking smile
  • SharePoint 2013 Provider-hosted apps are not supported
  • Code Analysis isn’t supported on TFS 2012 (or earlier) without installing Visual Studio 2012 Premium or Ultimate…yep complete utter garbage!

Happy Continuous Integration with SharePoint Peeps!

4 thoughts on “SharePoint, Visual Studio 2012 and Team Foundation Server 2012 and Unicorns”

  1. Can you install FxCop directly on the TFS box and run it via MSBuild to do Code Analysis? This might enable you to have CA without having to install VS on the TFS server.

    1. Yeah I’ve been trying to get that..problem is that FxCop only seems available in Windows 7 SDK and it won’t install on any of the machines I have…such a PITA…willl update once I find out more.

Leave a Reply