title: Building Portable Class Library Project in build server fails
body: <p>I've recently added some custom Portable Class Library projects to an application that is built in an build server. The build was working fine, but after that it stopped working and shows me the following messages:</p>
  
  <blockquote>
    <p>C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(983,
    5): warning MSB3644: The reference assemblies for framework
    ".NETPortable,Version=v4.0,Profile=Profile136" were not found.</p>
    
    <p>C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(1578,
    5): warning MSB3270: There was a mismatch between the processor
    architecture of the project being built "MSIL" and the processor
    architecture of the reference
    "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscorlib.dll",
    "AMD64".</p>
    
    <p>error CS0234: The type or namespace name 'Linq' does not exist in the
    namespace 'System' (are you missing an assembly reference?)</p>
  </blockquote>
  
  <p>The build server specs:</p>
  
  <ul>
  <li>Windows Server 2008 R2 Standard</li>
  <li>TeamCity 8.0.4</li>
  <li>.NET 4.5</li>
  <li><a href="http://visualstudiogallery.msdn.microsoft.com/b0e0b5e9-e138-410b-ad10-00cb3caf4981/" rel="noreferrer">Portable Class Library Tools</a> (as advised <a href="http://msdn.microsoft.com/en-us/library/gg597391%28v=vs.110%29.aspx" rel="noreferrer">here</a>)</li>
  <li><a href="http://www.microsoft.com/en-us/download/details.aspx?id=28359" rel="noreferrer">Silverlight 5 SDK</a></li>
  </ul>
  
  <p>The solution is a .NET 4.0 application and the portable projects target .NET4.0+ e Silverlight 5, only.
  <img src="https://i.stack.imgur.com/EoUq2.png" alt="portable targets"></p>
  
  <p>I have checked my development machine (Windows 8, Visual Studio 2012). There is indeed a folder "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETPortable\v4.0\Profile\Profile136" (in fact, the profiles for .NET 4.0 go up to 158).
  In the build machine, however, there are only folders for profiles up to 131.</p>
  
  <p>Is Portable Class Library Tools  up to date? It seems it miss installing profiles for the most recent platforms.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I copied the ".NETPortable\v4.0\Profile\Profile136" of my development machine to the build server, and now the application builds successfully. I still would like to know why installing the Portable Class Library Tools does not work out of the box.</p>