title: Determine the source of an indirect dependency on incorrect .NET Framework version
body: <p>I would like to know how I can determine the source of this build error;</p>
  
  <pre><code>Warning 4   The primary reference "MyNamespace.MyProject" could not be resolved because 
     it has an indirect dependency on the .NET Framework assembly "System.Xml, Version=4.0.0.0,
     Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than
     the version "2.0.0.0" in the current target framework.   MyNamespace.MyOtherProject
  </code></pre>
  
  <p>I understand the meaning of this error (and the 5 others like it for this same project), but I cannot work out how to resolve it in my case. The 'primary reference' in this case (MyNamespace.MyProject) has no direct dependencies on .NET 4.0.x. </p>
  
  <p>The primary reference depends on only one other project of mine (MyNamespace.MyCoreProject), which the source project for the build (MyNamespace.MyOtherProject) also depends directly on. And the build is not complaining about <em>that</em> project having indirect references to .NET 4.0.x, so I assume I can rule that out.</p>
  
  <p>The primary reference has a direct dependency on three (3) 3rd party DLLs, all of which also Target .NET 2.0.</p>
  
  <p>I have employed dotPeek to examine the built libraries, and cannot see any reference to anything using .NET 4.0. </p>
  
  <p>The only other potential spanner in the works is the use of PostSharp, which is directly referenced by 'MyNamespace.MyCoreProject' (referenced by the primary reference project), which may be causing the problem, as I believe there is a related VS2010 bug when referencing PostSharp.dll (http://www.sharpcrafters.com/forum/Topic4444-4-1.aspx#bm4462), however I also removed that from the build chain and still see this error, so I assume I can also rule <em>that</em> out.</p>
  
  <p>If someone can tell me why this is happening, fantastic! If not, some direction on how to work out what the unnamaed 'indirect reference' is would be just as helpful!</p>
  
  <p>Incidentally, I have tried all of the following tools to get some info, but they're not telling me much I didn't already know (which is the direct dependencies of the DLL in question);
   - .NET Reflector
   - dotPeek
   - IldAsm
   - Depends (Dependency Walker)</p>