title: "You must add a reference to assembly PresentationFramework" -- but why?
body: <p>I am really newbie to c# and VS2010.  :-\</p>
  <p>I have a &quot;pure&quot; Winforms application.  Or at least I think so.</p>
  <p>But suddenly (with the last changes to the source code) I have this error when build an auxiliary DLL:</p>
  <blockquote>
  <p>Error 7<br />
  The type
  'System.Windows.Interop.HwndHost' is
  defined in an assembly that is not
  referenced. You must add a reference
  to assembly '<strong>PresentationFramework</strong>,
  Version=3.0.0.0, Culture=neutral,
  PublicKeyToken=31bf3856ad364e35'. D:\MyprojectPath\SharedExceptions.cs    AuxLibraryProject</p>
  </blockquote>
  <p>I don't want to add <em>PresentationFramework.dll</em> to the project and even when I have tried to add it then a lot of other assemblies are required. :-(</p>
  <p>I want to know WHERE is the guilty of this assembly requirement.   I will be happy to blame some line on my source code but I cannot find it.</p>
  <p>The <code>SharedExceptions.cs</code> is one of the files changed but when I (manually) delete all changes, the error persists.</p>
  <p>This same assembly compiles fine on a Windows XP Visual Studio 2010 system.  But not on Windows Vista.</p>
  <hr />
  <p><strong>Update:</strong></p>
  <p>I have left alone the parent exception for all others.  All other are on other files.  After rebuild, the error remains on the same file.  Here is the little source code.  I cannot see anything requiring the new assembly:</p>
  <pre><code>using System;
  
      namespace PROJECT.AuxLibraryProject
      {
          public class SharedExceptionParent: Exception
          {
               public string ErrorMessage
               {
                   get
                   {
                       return base.Messsage.ToString();
                   }
               }
               public SharedExceptionParent() { }
               public SharedExceptionParent(string errorMessage) : base(errorMessage) { }
               public SharedExceptionParent(string errorMessage, Exception innerEx) : base(errorMessage, innerEx) { }
          }
      }
  </code></pre>