TFS Build configuration issue for SharePoint
This post is a contribution from Sohail Sayed, an engineer with the SharePoint Developer Support team
We recently worked on an issue with a customer configuring TFS build for SharePoint 2013
Customer followed the article https://msdn.microsoft.com/en-us/library/ff622991.aspx
There seems to be some changes compared to this article for resolving the SharePoint reference assemblies which I have listed below
As per the above msdn link to resolve the references we need to follow the below steps
It is recommended that you copy the SharePoint Server assemblies to the folder:
.. \Program Files\Reference Assemblies\SharePoint\
And then add one of the following registry entries:
For 64-bit systems:
We could not find the HKEY_LOCAL_SYSTEM key in the registry.
Instead we had to update HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Wow6432Node\.NETFramework\v4.0.30319\AssemblyFoldersEx\SharePoint]@=
However this change will not work on its own
We had to add the command line argument " /tv:12.0" to specify the tool version.
In addition we need to ensure the build is happening as 64 bit and not 32 bit and the build should be able to resolve the SharePoint references successfully.