title: Portable Class Library - you must add a reference to assembly 'System.Net, Version=2.0.5.0
body: <p>We have a Portable Class Library targeting 4.0.  A WPF application references this which is a standard .NET 4.0 app.</p>
  
  <p>The PCL references the System.Net.NetworkCredential class.</p>
  
  <p>When we build the .NET 4.0 app we get an error:</p>
  
  <pre><code>The type 'System.Net.NetworkCredential' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Net, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'.
  </code></pre>
  
  <p>Several posts say to install KB2468871.  That doesn't apply/change things.</p>
  
  <p>If we add an assembly reference to "System.Net 4.0.0.0" in the app then the error changes:</p>
  
  <pre><code>Reference to type 'System.Net.NetworkCredential' claims it is defined in 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Net.dll', but it could not be found...
  </code></pre>
  
  <p>Of course NetworkCredential is not in System.Net, it is in the System assembly.</p>
  
  <p>If I retarget to 4.5 everything works, but we need to use 4.0.</p>
  
  <p>Any ideas?  Thanks.</p>