We have a Portable Class Library targeting 4.0. A WPF application references this which is a standard .NET 4.0 app.
The PCL references the System.Net.NetworkCredential class.
When we build the .NET 4.0 app we get an error:
The type 'System.Net.NetworkCredential' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Net, Version=126.96.36.199, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes'.
Several posts say to install KB2468871. That doesn't apply/change things.
If we add an assembly reference to "System.Net 188.8.131.52" in the app then the error changes:
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...
Of course NetworkCredential is not in System.Net, it is in the System assembly.
If I retarget to 4.5 everything works, but we need to use 4.0.