title: Warnings and errors (CS0436, CS0234) when creating user controls composed of other user controls in the same project
body: <p>I'm working on a Windows Forms solution with many winform ui projects.
  There is a class library project that contains some custom shared controls, named <code>MyControls</code>.</p>
  
  <p>Now, when I create a control in <code>MyControls</code> 
  that is composed of one or more controls in the same project, I run into problems.</p>
  
  <p>I either get compilation warnings: warning CS0436: The type 'MyType' in 'path-to\MyType.cs' conflicts with the imported type 'MyType' in 'MyControls.dll'. Using the type defined in 'path-to\MyType.cs'. Or I get a bunch of different compilation errors, all pointing to "MyControls.dll" (error CS0234 - "are you missing an assembly reference?").</p>
  
  <p>I get either the errors, or the warnings, never both.</p>
  
  <p>How to solve this?</p>
  
  <p><em>Note</em></p>
  
  <p>I added <a href="/questions/tagged/visual-studio-2010" class="post-tag" title="show questions tagged 'visual-studio-2010'" rel="tag">visual-studio-2010</a> because that's the version I experienced the problems with. No idea if this relates to other versions too.</p>